Search in Vuetify data tables is just beautiful. Define a data table and a search is readily available for you. What else can a human ask for?
In fact, data tables were the single biggest reason for me to choose Vuetify about an year back. My long term association with data-driven application means that I am ever-so-dependent on the data table functionality.
Many other libraries in the market need you to implement search by yourself. Although not a big deal (the code is highly reusable), it is nice to not worry about yet another feature for once.
You describe a data table in Vuetify like so -
|
|
Define search
, headers
, and records
in the <script>
block, and you have the complete search function defined for you.
|
|
Note that the search function finds results by matching values in all fields in all records in the results. These loops may not be as efficient as you want in larger data sets. Also, the functionality does not work if you are tying search results to paginated data from server. In these cases, you would want to use your own search function rather than the one provided by Vuetify.