-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Disable v-data-table
sorting through a reimplementation of the disable-sort
prop
#19197
[Feature Request] Disable v-data-table
sorting through a reimplementation of the disable-sort
prop
#19197
Comments
This is not wrong. each column has own prop to disable sorting. |
I believe you're talking about the Are there any documented examples of dynamically setting the |
Problem to solve
In Vuetify 3,
v-data-table
doesn't contain an easy way to prevent sorting on columns based on the value of a prop, much like how thedisable-sort
prop worked in Vuetify 2.In Vuetify 2, I was able to disable sorting when a data table was loading data by adding the
:disable-sort="loading"
prop to my table. That allowed me to only allow sorting if we weren't loading in content, which could prevent any race conditions that led to an incorrect ordering of data due to multiple requests for data at once.I could prevent users from sorting things by exiting early from a sort function if my
loading
flag is true. However, the issue is that users are still able to spam click the sort icons, and being able to prevent them from doing that by disabling those icons while data is loading would be preferable.Proposed solution
Reimplement Vuetify 2's
disable-sort
prop or something similar forv-data-table
andv-data-table-server
. That prop should completely disable the sorting icons in the data table header so that users aren't allowed to spam click the sort buttons while data is loading or other things are happening with a table.The text was updated successfully, but these errors were encountered: