[Feature Request] Disable v-data-table
sorting through a reimplementation of the disable-sort
prop
#19197
Labels
v-data-table
sorting through a reimplementation of the disable-sort
prop
#19197
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: