question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Way to retrieve (watch) the filtered Items from the searchTableItems function of a VDataTable?

See original GitHub issue

Problem to solve

How to retrieve (watch) the filtered Items from the searchTableItems function of a VDataTable? For e.g. with

    mounted: function () {
            this.$watch(
                "$refs.tableRefName.items",
                 (new_value, old_value) => (this.searchData = new_value)
            );
    },

$refs.tableRefName.items returns all items of the table, although I filtered the Data Table Items using a standard search input field and seeing the filtered results with

<v-data-table  :search="search" ...

“$refs.tableRefName.items” still contains all (unfilterd) items.

Proposed solution

I was hoping to find something like “$refs.tableRefName.filteredItems” or “$refs.tableRefName.searchTableItems” to retrieve the filtered Items but didn’t.

Cheers Tim

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
PushyPantscommented, Apr 21, 2020

Until it there is an official solution, I was able to find the search results nested in the refs.

$refs.refName.$children[0].filteredItems

10reactions
klukiyancommented, Aug 9, 2021

I’m also looking at server side pagination, which would solve the issue, but of course then search goes out the window

You can sort, paginate, and filter server-side.

I don’t know why this issue has been left open for so long @current-items was added in #5737 and is emitted whenever computedItems changes.

@current-items doesn’t help as it shows only items on the page. More useful would be something like @filtered-items to access all filtered items regardless if they are on the page 1 or else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to retrieve the filtered data table items (as an array) when ...
Everything understood / it works fine. But how can I retrieve the filtered data table items (as an array) within the custom search...
Read more >
Data table component - Vuetify
The v-data-table component is used for displaying tabular data. ... you can supply a function to the filter property on header items.
Read more >
DataTable Filtering - Documentation - Webix
Server Filter. A text filter that works with backend. Retrieves the text from the text field and sends a request to server to...
Read more >
DataTable - Smartsheet Learning Center
DataTable allows you to visualize and collaborate on large data sets in Smartsheet by connecting and combining siloed data from ERPs, CRMs, and...
Read more >
DataTable Class (System.Data) - Microsoft Learn
Put the next line into the Declarations section. private System.Data.DataSet dataSet; private void MakeDataTables() { // Run all of the functions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found