feat(VDataTable): enhance data-table "color" prop #19700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Makes it easier to change the color of the selection checkboxes, the loader and the selected item in the pages dropdown.
The
color
prop in v-data-table is being underused. So far it's only changing the color of the header badges whenmulti-sort
is enabled.When I set the
color
prop it's because I want to customize the appareance of the table to match the desired color wherever it makes sense and not only to a very specific -almost hidden- part of it. It gives the feeling that thecolor
prop isn't changing anything.In V2 we had a
checkboxColor
prop for changing the color of the selection checkboxes, but I think this could be just handled by thecolor
prop itself.In addition, I have made the loader component follow the
color
while still respecting the value you pass to theloading
prop if a color is provided.Lastly I made the page dropdown also follow the color for the current page selected.
Using the
color
prop in these three addtional places will provide a quick look and feel customization of the data-tables enhancing the usage of the prop.Markup: