Skip to content

Commit

Permalink
[DST-504]: Sorting indicator is always shown in table (#4056)
Browse files Browse the repository at this point in the history
* DST-504: hiding the sort indicator initially in table

* Create big-moons-pretend.md

* Update big-moons-pretend.md
  • Loading branch information
aromko authored Jul 30, 2024
1 parent 8bdfc1b commit 5d53af4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-moons-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marigold/components": patch
---

[DST-504]: Sorting indicator is shown only on sorted column.
7 changes: 4 additions & 3 deletions packages/components/src/Table/TableColumnHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { mergeProps } from '@react-aria/utils';
import { GridNode } from '@react-types/grid';

import { SortDown, SortUp } from '@marigold/icons';
import { cn, useStateProps } from '@marigold/system';
import { width as twWidth } from '@marigold/system';
import { cn, width as twWidth, useStateProps } from '@marigold/system';

import { useTableContext } from './Context';
import { ColumnProps } from './Table';
Expand Down Expand Up @@ -64,7 +63,9 @@ export const TableColumnHeader = ({
<SortDown className="inline-block" />
)
) : (
<SortDown className="inline-block" />
<span className="invisible">
<SortDown className="inline-block" />
</span>
))}
</th>
);
Expand Down

0 comments on commit 5d53af4

Please sign in to comment.