Sorting third click (removal) issue. #1285
Unanswered
rishabh-gumgum
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using own sorting state, and using
manualSorting: true
.The initial state used is :
const [sorting, setSorting] = useState([{ id: 'id', desc: 'true' }]);
Passed the relevant options to
useMaterialReactTable
hook as well such as:Now the issue on first click of a sorting button, it works fine. On second click too it work fine but on third click which is supposed to be sorting removal, it is clearing the sorting state array of objects internally and page is breaking since I am using this sorting state in my API URL too which is a required param, now because of sorting state getting completely empty internally on third click my app is breaking.
Also note, this is happening on using Clear Sort option from column options too.
Is this behavior intended or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions