Skip to content

fix: disable sorting of rows from header if interacting with input elements #3574

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 3 commits into from

Conversation

holaChaitanya
Copy link

@holaChaitanya holaChaitanya commented Aug 11, 2024

fixes this issue

how to recreate the bug -

  • let's say you're putting an input element in HeaderCell component
  • this input element was being used for filtering functionality as shown in this example
  • now, you also implemented sorting of rows from the column header
  • when you try to filter out by typing in the input element and put an empty space, this will trigger sorting
  • the above behaviour also occurs when you click inside an input element

fix -

  • checking if the click or keyDown events happened inside an input element, if yes, then not triggering the onSort function in HeaderCell component

@amanmahajan7
Copy link
Contributor

Can this not be handled with a custom renderHeaderCell?

@amanmahajan7
Copy link
Contributor

Closing due to inactivity

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Columns are sorted when space key is down during typing in filters
2 participants