问题
I would like to access the remaining data of a filtered Element UI
Table
.
Please see the example implementation on the Element UI
website:Table Filter
: https://element.eleme.io/#/en-US/component/table
Suppose I set the Tag
filter to Home
, the table would show two remaining columns.
Is there a way to access only the not filtered columns?
A simple example use case would be to get the number of remaining rows.
It was not yet possible for me to directly access the remaining data.
I tried to use the filter-method
to collect the necessary data to filter the data myself.
Filtering would basically work, but resetting the filter doesn't trigger an event, so this approach is useless to me.
Do I miss something, does anyone have an idea? Thank you!
回答1:
You can access the not filtered records.
Add a ref to the table like
<el-table ref="table">
Then you can access it in a method with:
this.$refs.table.tableData
来源:https://stackoverflow.com/questions/57612126/work-with-filtered-data-of-element-ui-table