diff --git a/packages/bbui/src/Table/CellRenderer.svelte b/packages/bbui/src/Table/CellRenderer.svelte index 89f7e8716d..d0323487e1 100644 --- a/packages/bbui/src/Table/CellRenderer.svelte +++ b/packages/bbui/src/Table/CellRenderer.svelte @@ -26,7 +26,7 @@ $: renderer = customRenderer?.component ?? typeMap[type] -{#if renderer && value != null && value !== ''} +{#if renderer && (customRenderer || (value != null && value !== ''))} diff --git a/packages/bbui/src/Table/StringRenderer.svelte b/packages/bbui/src/Table/StringRenderer.svelte index ae95297dfc..2756839616 100644 --- a/packages/bbui/src/Table/StringRenderer.svelte +++ b/packages/bbui/src/Table/StringRenderer.svelte @@ -3,7 +3,6 @@
{value}
- diff --git a/packages/standard-components/src/table/BooleanRenderer.svelte b/packages/standard-components/src/table/BooleanRenderer.svelte deleted file mode 100644 index a71e28cb91..0000000000 --- a/packages/standard-components/src/table/BooleanRenderer.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/packages/standard-components/src/table/CellRenderer.svelte b/packages/standard-components/src/table/CellRenderer.svelte deleted file mode 100644 index 0c14ec2aa5..0000000000 --- a/packages/standard-components/src/table/CellRenderer.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - -{#if value != null && value !== ''} - {#if plainTypes.includes(type)} - - {:else if type === 'boolean'} - - {:else if type === 'datetime'} - - {:else if type === 'link'} - - {:else if type === 'attachment'} - - {/if} -{/if} diff --git a/packages/standard-components/src/table/DateTimeRenderer.svelte b/packages/standard-components/src/table/DateTimeRenderer.svelte deleted file mode 100644 index 169adab163..0000000000 --- a/packages/standard-components/src/table/DateTimeRenderer.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - -
{dayjs(value).format('MMMM D YYYY, HH:mm')}
- - diff --git a/packages/standard-components/src/table/RelationshipRenderer.svelte b/packages/standard-components/src/table/RelationshipRenderer.svelte deleted file mode 100644 index 6c04000fa7..0000000000 --- a/packages/standard-components/src/table/RelationshipRenderer.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -{#each relationships as relationship} - {#if relationship?.primaryDisplay} - - {relationship.primaryDisplay} - - {/if} -{/each} -{#if leftover} -
+{leftover} more
-{/if} diff --git a/packages/standard-components/src/table/SlotRenderer.svelte b/packages/standard-components/src/table/SlotRenderer.svelte new file mode 100644 index 0000000000..dc24f4249c --- /dev/null +++ b/packages/standard-components/src/table/SlotRenderer.svelte @@ -0,0 +1,11 @@ + + + + + diff --git a/packages/standard-components/src/table/StringRenderer.svelte b/packages/standard-components/src/table/StringRenderer.svelte deleted file mode 100644 index 2756839616..0000000000 --- a/packages/standard-components/src/table/StringRenderer.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - -
{value}
- - diff --git a/packages/standard-components/src/table/Table.svelte b/packages/standard-components/src/table/Table.svelte index 8065b520e9..b213c3c397 100644 --- a/packages/standard-components/src/table/Table.svelte +++ b/packages/standard-components/src/table/Table.svelte @@ -1,8 +1,8 @@ -{#if !loaded} -
-{:else} -
-
-
- - - - {#if $component.children} - - {/if} - {#each fields as field} - - {/each} - - - - {#each sortedRows as row, idx} - lastVisibleRow}> - {#if idx >= firstVisibleRow && idx <= lastVisibleRow} - {#if $component.children} - - {/if} - {#each fields as field} - - {/each} - {/if} - - {/each} - -
-
-
sortBy(field)}> -
-
{schema[field]?.name}
- -
-
-
- - - -
-
-
- -
-
-
-
-
-{/if} - - +
+ + +
+