Parcourir la source

Table: init filters.

Liril il y a 8 ans
Parent
commit
d652e73f74
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      packages/table/src/table.vue

+ 10 - 0
packages/table/src/table.vue

@@ -369,6 +369,16 @@
       this.bindEvents();
       this.doLayout();
 
+      // init filters
+      this.store.states.columns.forEach(column => {
+        if (column.filteredValue && column.filteredValue.length) {
+          this.store.commit('filterChange', {
+            column,
+            values: column.filteredValue
+          });
+        }
+      });
+
       this.$ready = true;
     },