Skip to content

Commit

Permalink
fix(Table): invalid sort indicator location when sticky is enabled (#510
Browse files Browse the repository at this point in the history
)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Updated the `Sortable` table component to require cell properties as
strings only.

- **Style**
- Enhanced visual focus handling in the `ButtonSort` component by
adjusting border transparency settings.

- **Tests**
- Updated tests to reflect style changes in the `ButtonSort` component.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
aversini authored Apr 16, 2024
1 parent b17da22 commit 8408f69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/documentation/src/Components/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export const WithRowNumbers: Story<any> = (args) => {

export const Sortable: Story<any> = (args) => {
const [sortState, setSortState] = useState<{
cell: string | number;
cell: string;
direction:
| typeof TableCellSortDirections.ASC
| typeof TableCellSortDirections.DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export const ButtonSort = React.forwardRef<HTMLButtonElement, ButtonSortProps>(
? clsx(
"relative",
"focus-within:static",
"focus-within:after:border-transparent",
"after:absolute",
"after:content-['']",
"after:border-b-2",
"after:z-[-1px]",
"after:bottom-[-4px]",
"after:left-0",
"after:right-0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ describe("ButtonSort modifiers", () => {
if (parent) {
expectToHaveClasses(parent, [
"focus-within:static",
"focus-within:after:border-transparent",
"after:absolute",
"after:content-['']",
"after:border-b-2",
"after:z-[-1px]",
"after:bottom-[-4px]",
"after:left-0",
"after:right-0",
Expand All @@ -217,10 +217,10 @@ describe("ButtonSort modifiers", () => {
if (parent) {
expectToHaveClasses(parent, [
"focus-within:static",
"focus-within:after:border-transparent",
"after:absolute",
"after:content-['']",
"after:border-b-2",
"after:z-[-1px]",
"after:bottom-[-4px]",
"after:left-0",
"after:right-0",
Expand Down

0 comments on commit 8408f69

Please sign in to comment.