Skip to content

How to align column content to the right? #130

Closed Answered by MLNW
MLNW asked this question in Q&A
Discussion options

You must be logged in to vote

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>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MLNW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant