Skip to content

Commit 4376c56

Browse files
committed
fix(DataTable): sort button should be on left side of numeric HeaderItem
1 parent a024607 commit 4376c56

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/mdc/Datatable/HeaderItem.svelte

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ const labelID = generateRandomID('column-label-')
1919
>
2020
{#if sortable}
2121
<div class="mdc-data-table__header-cell-wrapper">
22+
{#if numeric}
23+
<IconButton icon="arrow_upward" ariaLabel={`Sort by ${columnID}`} class="mdc-data-table__sort-icon-button" />
24+
{/if}
2225
<div class="mdc-data-table__header-cell-label">
2326
<slot />
2427
</div>
25-
<IconButton icon="arrow_upward" ariaLabel={`Sort by ${columnID}`} class="mdc-data-table__sort-icon-button" />
28+
{#if !numeric}
29+
<IconButton icon="arrow_upward" ariaLabel={`Sort by ${columnID}`} class="mdc-data-table__sort-icon-button" />
30+
{/if}
2631
<div class="mdc-data-table__sort-status-label" aria-hidden="true" id={labelID} />
2732
</div>
2833
{:else}

0 commit comments

Comments
 (0)