core: [Regression] Server side column sorting
Guidelines
Describe the bug
On previous library, we can disable the internal state sort mechanism in order to use external managed one.
This can be done by setting a no-op customSort method on columns definition.
See :
https://github.com/mbrn/material-table/issues/64
https://github.com/mbrn/material-table/issues/1798
And PR Proposal for a new dedicated property : https://github.com/mbrn/material-table/pull/2480
To Reproduce
- Go to ‘https://codesandbox.io/s/charming-blackwell-8vz3d?file=/src/App.js’
- Table is sorted on ‘Pants’
- Click on ‘RESET SORT’
- Nothing happen
Working sandbox (with previous library) : https://codesandbox.io/s/autumn-microservice-hb1xu?file=/src/App.js
Expected behavior
If customSort is a no-op, internal sort state should not be used.
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 94.0.4606.81
Yours faithfully, LCDP
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (9 by maintainers)
I feel you. I just finished my masters, so this was quite stressful as well. But glad to see you are back. No pressure though 😄
Hi @oze4,
It look like that regression occurred on v2.3.6 (https://codesandbox.io/s/zealous-grothendieck-hu841) because v2.3.5 (https://codesandbox.io/s/dank-wildflower-c7371?file=/src/App.js) is O.K.
Hi @Domino987,
customSortis used to indicate material table to not use the sort mechanism of the library.defaultSortis used in combination withcustomSortto set the current sort to render.So I think that we need the combination of both in order to have the feature working.
P.S : GG for your master. 👍
Yours faithfully, LCDP