Line breaks in a cell inside a Quasar Data Table
-
Hi,
I am using v15 of Quasar and have a question about using a data table.
I would like to have a hard return in one of the data table cells
Here is a snip from the columns object
{ label: "Description", name: "description", field: "description", align: "left", filter: true, sortable: true, type: "string", style: { color: "#000000", "white-space": "normal" }, width: "120px" },
I would like the field description to have a <BR><BR> in it, but when I add that to the text it renders it as text and not HTML.
Is there a way to put a line break in here?
Thanks,
Stephen
-
You can use the
format
option of the column definition. (cf http://quasar-framework.org/components/datatable.html#Display-a-nested-property-or-format-a-column)
Another way: use the cell scoped slot (cf http://quasar-framework.org/components/datatable.html#Custom-column-cell)