You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onClick is on top of everything so anything you put inside the header div will be activated as soon as you click the cell, even the filter which is inside the header renderer
Video:
Monosnap.screencast.2024-06-06.08-43-19.mp4
The text was updated successfully, but these errors were encountered:
we don't want the entire header cell to be clickable for sorting purposes, since there are additional buttons/controls in there for other things, such as pulling up a filter popup. it would be very useful to delegate what should trigger sorting to the user-supplied children of HeaderCell via a render prop or callback arg like doSort, or smth.
currently i think the only way to do this is by hackily binding listeners in the children with stopPropagation to prevent the built-in sort behavior (both click and keypress).
some flexibility here would be much appreciated.
i see there are some related issues with filters in header cells, so feels like it's not such an edge case:
Describe the bug
To Reproduce
Expected behavior
Not sort the column
Environment
react-data-grid
version: ^7.0.0-beta.44react
/react-dom
version: ^18.2.0Additional context
The problem comes from this line
react-data-grid/src/HeaderCell.tsx
Line 279 in b667cec
onClick is on top of everything so anything you put inside the header div will be activated as soon as you click the cell, even the filter which is inside the header renderer
Video:
Monosnap.screencast.2024-06-06.08-43-19.mp4
The text was updated successfully, but these errors were encountered: