Should the initial sorting state include the unsorted option
Hi : D
I'm trying to control the initial state of a table with query params in a NextJS project. I can control the page and the rows per page no problem with query params passed in as props with default value fallbacks but something like this:
Isn't flexible enough because it constrians the sorting state of the title column to either
desc
or asc
. If the query param for this column isn't defined I'd rather this column remain unsorted.
Am I thinking about this problem correctly?2 Replies
other-emerald•16mo ago
just fallback to an empty array if no sorting is set.
extended-salmonOP•16mo ago
ohhhh don't include the object at all in the array, that makes perfect sense lol
ty, i'll try that : D