AllenFang / react-bootstrap-table

A Bootstrap table built with React.js
https://allenfang.github.io/react-bootstrap-table/
MIT License
2.24k stars 783 forks source link

table.cleanSort() doesn't work #2106

Closed vtarelkin closed 4 years ago

vtarelkin commented 4 years ago

I try to use a remote pagination and filter and sorting. I need to handle all of this on server and I need to disable sorting manually, but for the UI purpose I want to leave arrow that shows the direction of the sorting.

I have a ref in bootstrap table (I use useRef())

            <BootstrapTable
                ref = {tableRef}
   const onSortChange = (sortName, sortOrder) => {

        tableRef.current.table.cleanSort();
        dispatch(tableOrderChanged(sortName, sortOrder));
    };

It gives me an error cleanSort() is not a function

vtarelkin commented 4 years ago

https://github.com/AllenFang/react-bootstrap-table/issues/1905 very close to it @AllenFang