Work with filtered data of Element UI table

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 06:09:01

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!