Open mordonez-me opened 4 months ago
Not sort the column
react-data-grid
react
react-dom
The problem comes from this line https://github.com/adazzle/react-data-grid/blob/b667cec545666308ec59d74580b695e344380379/src/HeaderCell.tsx#L279
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:
https://github.com/adazzle/react-data-grid/assets/2242042/22030774-547d-4a86-8d5c-0079ae635c22
Share Codepen link, I would be more helpful
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 https://github.com/adazzle/react-data-grid/blob/b667cec545666308ec59d74580b695e344380379/src/HeaderCell.tsx#L279
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:
https://github.com/adazzle/react-data-grid/assets/2242042/22030774-547d-4a86-8d5c-0079ae635c22