element [Feature Request] Can el-table filter checkbox be set values?

lkaoscv7  于 4个月前  发布在  其他
关注(0)|答案(5)|浏览(133)

Existing Component

Component Name

el-table

Description

Sometimes we need to keep the status of table filter checkboxes in sync with other state values. There's table.clearFilter() method, and there should be table.setFilter() method or something like that.

lf5gs5x2

lf5gs5x21#

Translation of this issue:

Existing Component

yes

Component Name

el-table

Description

Sometimes we need to keep the status of table filter checkboxes in sync with other state values. There's table.clearFilter() method, and there should be table.setFilter() method or something like that.

daolsyd0

daolsyd02#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

beq87vna

beq87vna3#

Set the filtered-value in the column to keep state https://element.eleme.io/#/en-US/component/table#table-column-attributes

db2dz4w8

db2dz4w84#

@James-Burgess this prop seems to be not reactive. When its value changes, the table data won't update

qnakjoqk

qnakjoqk5#

@SamueleCaprioli97 I came across the same issue and solved it by setting a key on the table and incrementing that value each time I changed the values.

<el-table :key=forceTableUpdateKey ..... >
  //...
data () {
  return { 
    forceTableUpdateKey: 0,
 //....
function UpdateFIlters() {
  this.filterValue = newFilterValue
  this.forceTableUpdateKey++

相关问题