Skip to content

Commit

Permalink
Merge pull request #657 from tobigumo/fix/filter-popover-keyboard-sor…
Browse files Browse the repository at this point in the history
…t-issue

Prevent Sorting from Being Triggered When Using Filter Popovers with Keyboard Input
  • Loading branch information
icflorescu authored Nov 26, 2024
2 parents c31325b + 61964b5 commit ef47159
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion package/DataTableHeaderCellFilter.tsx
Original file line number Diff line number Diff line change
@@ -25,11 +25,19 @@ export function DataTableHeaderCellFilter<T>({ children, isActive }: DataTableHe
e.preventDefault();
toggle();
}}
onKeyDown={(e) => {
e.stopPropagation();
}}
>
<Icon />
</ActionIcon>
</PopoverTarget>
<PopoverDropdown onClick={(e) => e.stopPropagation()}>
<PopoverDropdown
onClick={(e) => e.stopPropagation()}
onKeyDown={(e) => {
e.stopPropagation();
}}
>
{typeof children === 'function' ? children({ close }) : children}
</PopoverDropdown>
</Popover>

0 comments on commit ef47159

Please sign in to comment.