No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Line breaks in a cell inside a Quasar Data Table

    Help
    2
    2
    2850
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      ssimpson last edited by

      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

      1 Reply Last reply Reply Quote 0
      • C
        chbarr last edited by

        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)

        1 Reply Last reply Reply Quote 0
        • First post
          Last post