Custom Filter + Sort in one column
See original GitHub issueWhen I define a column with cell filtering and sorting enabled, clicking the filter input triggers the sorting. Can I somehow compose the header by myself (trigger included)? I tried headerFormatter, but I think the sort function is bound to the th.sortable element itself, and I can’t access it from headerFormatter iteself.
I can’t find such an example in the Storybook. Sorting and Filtering are occouring independantly only.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Sort data in a range or table - Microsoft Support
Optionally, create a custom list: · Select a cell in the column you want to sort. · On the Data tab, in the...
Read more >Sort data in a table - Microsoft Support
Select Home > Sort & Filter. ... Or, select Data > Sort. ... Select an option: ... Custom Sort - sorts data in...
Read more >How to Use the Custom Sort Feature in Microsoft Excel
Select the data you want to sort. · Go to the Home tab and click Sort & Filter in the Editing section of...
Read more >How to sort in Excel by row, column names and in custom order
The simplest way to sort your column is to click A-Z button either under the Home tab, Editing group or on the Data...
Read more >How to Sort in Excel Rows or Columns Avoid Sort Problems
In the Editing group, click the arrow on Sort & Filter. Click Custom Order. custom sort command. In the Sort dialog box, select...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@owczar1981 @victorkpublic I think if you guys use custom filter, you may need to call
stopPropagationmanually. to avoid the event bobble up: for example this is howreact-bootstrap-table2avoid to trigger the sort when click on default text filter:https://github.com/react-bootstrap-table/react-bootstrap-table2/blob/master/packages/react-bootstrap-table2-filter/src/components/text.js#L75-L80
Let me know if above solution is not work for you guys. thanks
I am using customFilter with react-datepicker, and I am facing the same issue.
function DateTimeFilter(props) { const { onFilter, column } = props;
}
this is the code snippet I am using but after preventing also the sorting gets triggered
@AllenFang