You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, v-data-table has no way of rendering a placeholder sort icon in a column header to indicate to users that the column in a data table can be sorted. As it is right now, you can only see that a column is sortable by hovering over its header. If you want to add a default sort icon, you'd currently have to use the #headers slot and recreate the entire header of the table to accommodate the change... which seems like overkill.
Users of the website I'm building indicated that they weren't aware that headers could be sorted without a default icon, until they were instructed to click on a header to sort the table by that column. That would indicate to me that this is enough of a use case to warrant having the option to show show a default sort icon on a header if the sortable prop of the header is true.
Proposed solution
Include a default-sort-icon prop on v-data-table and v-data-table-server that renders a default sort icon when provided with a value. That prop should provide a default sort icon on sortable headers when included. Headers that are not sortable should not render a default icon. If the prop is not included on the table, no sort icon should be shown to maintain current data table functionality.
The text was updated successfully, but these errors were encountered:
Problem to solve
Currently,
v-data-table
has no way of rendering a placeholder sort icon in a column header to indicate to users that the column in a data table can be sorted. As it is right now, you can only see that a column is sortable by hovering over its header. If you want to add a default sort icon, you'd currently have to use the#headers
slot and recreate the entire header of the table to accommodate the change... which seems like overkill.Users of the website I'm building indicated that they weren't aware that headers could be sorted without a default icon, until they were instructed to click on a header to sort the table by that column. That would indicate to me that this is enough of a use case to warrant having the option to show show a default sort icon on a header if the
sortable
prop of the header istrue
.Proposed solution
Include a
default-sort-icon
prop onv-data-table
andv-data-table-server
that renders a default sort icon when provided with a value. That prop should provide a default sort icon onsortable
headers when included. Headers that are notsortable
should not render a default icon. If the prop is not included on the table, no sort icon should be shown to maintain current data table functionality.The text was updated successfully, but these errors were encountered: