Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmilkov committed Jan 25, 2024
1 parent 214e55e commit 2c339b8
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
$: dropdownFields = fields?.map(field => ({
id: serializePath(field.path),
text: shortFieldName(field.path)
text: shortFieldName(field.path),
displayPath: getDisplayPath(field.path)
}));
function selectInnerPath(
Expand Down Expand Up @@ -189,13 +190,15 @@
direction="left"
on:select={selectInnerPath}
selectedId={innerLeafPath && serializePath(innerLeafPath)}
tooltip={innerLeafPath ? `Grouping by ${getDisplayPath(innerLeafPath)}` : null}
tooltip={innerLeafPath ? `Exploring ${getDisplayPath(innerLeafPath)}` : null}
let:item
>
{@const slotItem = dropdownFields?.find(x => x === item)}
{#if slotItem}
<div class="flex items-center justify-between gap-x-1">
<span title={slotItem.text} class="truncate text-sm">{slotItem.text}</span>
<span title={slotItem.displayPath} class="truncate text-sm">
{slotItem.displayPath}
</span>
</div>
{/if}
</DropdownPill>
Expand All @@ -214,7 +217,9 @@
{@const slotItem = dropdownFields?.find(x => x === item)}
{#if slotItem}
<div class="flex items-center justify-between gap-x-1">
<span title={slotItem.text} class="truncate text-sm">{slotItem.text}</span>
<span title={slotItem.displayPath} class="truncate text-sm">
{slotItem.displayPath}
</span>
</div>
{/if}
</DropdownPill>
Expand Down

0 comments on commit 2c339b8

Please sign in to comment.