NuxtN
Nuxt13mo ago
4 replies
ninox023

How to Right-Align Cell Content in a UTable?

I want to right-align the content of specific cells in a UTable. When I add class: "text-right" to a column definition, it only aligns the column header but not the cell content. For example:

const columns = [ { key: "kostartebene1", label: "Kostart", sortable: true, direction: "asc" }, { key: "1", label: "Jan", class: "text-right" }, { key: "2", label: "Feb" }, { key: "3", label: "Mrz" }, { key: "4", label: "Apr" }, { key: "5", label: "Mai" }, { key: "6", label: "Jun" }, { key: "7", label: "Jul" }, { key: "8", label: "Aug" }, { key: "9", label: "Sep" }, { key: "10", label: "Okt" }, { key: "11", label: "Nov" }, { key: "12", label: "Dez" }, ];
Only the header text is right-aligned. How can I also align the cell content to the right?
Was this page helpful?