-
I'm trying to render some numbers in columns. In that context it is very common to align all cells of that column to the right to make the numbers more readable. I wasn't able to find an answer for this common issue in either the documentation or any issues. Did I miss something or is this not possible? |
Beta Was this translation helpful? Give feedback.
Answered by
MLNW
May 18, 2023
Replies: 1 comment
-
It's not as simple as I would have hoped but it's possible: $: columns = table.createColumns([
table.column({
header: () => createRender(Number, { value: 'Buy' }),
accessor: 'purchasePrice',
cell: ({ value }) => createRender(Number, { value })
})
]); // Number.svelte
<script lang="ts">
export let value: number;
</script>
<span class="block text-right">{value}</span> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MLNW
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not as simple as I would have hoped but it's possible: