As described in the title the DefaultSortColumn parameter does not work
In addition I realized that when sorting for a column instead of switching let’s say from A-Z and then Z-A, there’s a third sorting that is performed which is non-sense. It’s either A-Z nor Z-A… When you then click the column once more, it starts again with sorting correctly:
A-Z => Z-A => nonsense (unsorted), … etc.
As for the unsorted state, we can disable that via the library we are using. It seems they off a disableSortRemove option to prevent this from happening: API Reference: useSortBy | React Table | TanStack
Why, shall I use -LoadData? And what’s the difference in that case?
With regards to your final statement:
Do I understand it correctly that the library offers a function but you’ll need to implement it into PSU?
If that’s the case, first of all thanks a lot for doing that! I think it would absolutely make sense. Additionally the MultiSort would also make a lot of sense to me… Like the sorting function in Excel. where you basically specify the sortBy column order:
For example: First = Company, Second = Last Name
… just in case you want to make UDTable even more “pro”
THANKS A LOT again for all your efforts and considerations of our user feedbacks! Top!
When you use -LoadData, is for server-side data loading and we process things a bit differently in that case. I just wanted to understand how to approach the issue.
As for the sorting, we do need to implement the functionality in PSU that the library provides. I think the library offers multi-sort as well so I’ll open an issue for that too to see if we can get that going for you.
Just wanted to let you know that the -DefaultSortColumn is “gone” again in the latest nightly.
Would it be possible to fix that in one of your next releases?
It looks like this broken due to the introduction of -DefaultSortDirection. The default value is unsorted. If you set the default sort direction in one way, it works.