This is how is my data table is
<v-data-table
:search="search"
:headers="tableHeaders"
:items="tableItems"
hide-default-footer
></v-data-table>
Is there any way to get the filtered items from data table after search filter is applied. I am passing array in :items
which is being filtered by :search
.
Try to add a handler to @current-items
event like:
@current-items="getFiltered"
and add it to your methods as follows:
methods:{
getFiltered(e){
console.log(e) //output the filtered items
}
}
check this codepen
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.