Add table cell max width and support text truncation

This commit is contained in:
Andrew Kingston 2021-03-25 09:37:14 +00:00
parent e815996b8f
commit c95baec83f
3 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,5 @@
<script>
import StringRenderer from "./StringRenderer.svelte"
import BooleanRenderer from "./BooleanRenderer.svelte"
import DateTimeRenderer from "./DateTimeRenderer.svelte"
import RelationshipRenderer from "./RelationshipRenderer.svelte"
@ -13,7 +14,7 @@
{#if value != null && value !== ''}
{#if plainTypes.includes(type)}
{value}
<StringRenderer {value} />
{:else if type === 'boolean'}
<BooleanRenderer {value} />
{:else if type === 'datetime'}

View File

@ -0,0 +1,12 @@
<script>
export let value
</script>
<div>{value}</div>
<style>
div {
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -192,6 +192,8 @@
justify-content: flex-start;
align-items: center;
gap: 4px;
max-width: 320px;
overflow: hidden;
}
.spectrum-Table-sortedIcon {
opacity: 0;