Explorar o código

Table: init filters.

Liril %!s(int64=8) %!d(string=hai) anos
pai
achega
d652e73f74
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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;
     },