Closed
Description
After looking at the docs CDataTable does not have an event that indicates what are the current filtered items after one applies a filter to a specific column or searched in a table.
Hence, after looking at the code I saw that this can be easily achieved by emitting an event after
and for instancethis.$emit('update:table-items', this.currentItems)
The name of the new event is mere indicative.
Metadata
Metadata
Assignees
Labels
No labels
Activity
woothu commentedon Feb 12, 2020
Hi! Thank you for this idea!
What are the cases for using such an event?
Btw. 'currentItems' are not filtered items, but visible items. You probably meant 'tableFiltered' or 'sortedItems' (filtered items after applied sorting).
CVeniamin commentedon Feb 12, 2020
You are right! Was about to edit the issue since I saw that
currentItems
are the items visible items as you mentioned...One of the use cases would be to allow "download" the filtered items to a xlsx/csv file.
I think this can also be achieved through using
v-model
on aCDataTable
instead of an event but requires more code refactoring.woothu commentedon Feb 12, 2020
Very useful use-case! We will add this feature :)
CVeniamin commentedon Feb 12, 2020
Awesome!
woothu commentedon Feb 12, 2020
Feature introduced in 3.0.0-beta.11, commit: ea92ae7