React-table: Extra sorting action after resizing column.

Created on 13 Nov 2019  路  5Comments  路  Source: tannerlinsley/react-table

Describe the bug

When using both useResizeColumns and useSortBy like Examples in Documentation, Drag 'resizer' will trigger Header click events and do sort every time. Bubbling?

Expected behavior

Drag 'resizer' to resize column, NO SORT.

Codesandbox!

Edit tannerlinsley/react-table: column-resizing

Most helpful comment

You can solve this problem by taking different elements for header content on which you apply sort props and a sibling to it which applies resize props, something like https://codesandbox.io/s/tannerlinsleyreact-table-column-resizing-jel1b can help you.

All 5 comments

You can solve this problem by taking different elements for header content on which you apply sort props and a sibling to it which applies resize props, something like https://codesandbox.io/s/tannerlinsleyreact-table-column-resizing-jel1b can help you.

鈽濓笍 Well said. Apply the props to different elements.

@tannerlinsley Maybe this should be mentioned in the docs, but I'm not sure where exactly. I had to search the issues to find this information.

but it is working on my component. Thanks @gargroh

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwjft picture dwjft  路  3Comments

monarajhans picture monarajhans  路  3Comments

mellis481 picture mellis481  路  3Comments

danielmariz picture danielmariz  路  3Comments

Abdul-Hameed001 picture Abdul-Hameed001  路  3Comments