1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00

Improve table column width handling when custom widths are applied

This commit is contained in:
Andrew Kingston 2022-02-21 14:47:01 +00:00
parent 42845d2881
commit c701151bae
3 changed files with 19 additions and 11 deletions

View file

@ -10,6 +10,6 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
max-width: var(--max-cell-width);
}
</style>

View file

@ -41,13 +41,21 @@
</script>
{#if renderer && (customRenderer || (cellValue != null && cellValue !== ""))}
<svelte:component
this={renderer}
{row}
{schema}
value={cellValue}
on:clickrelationship
>
<slot />
</svelte:component>
<div style="--max-cell-width: {schema.width ? 'none' : '200px'};">
<svelte:component
this={renderer}
{row}
{schema}
value={cellValue}
on:clickrelationship
>
<slot />
</svelte:component>
</div>
{/if}
<style>
div {
display: contents;
}
</style>

View file

@ -9,6 +9,6 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
max-width: var(--max-cell-width);
}
</style>