zollero / el-search-table-pagination

🐶 Combine Form, Table and Pagination components of Element UI together.
MIT License
306 stars 79 forks source link

@filter-change method #9

Closed kikoseijo closed 6 years ago

kikoseijo commented 6 years ago

working on filtering, when I receive the property its a bit rare the way to parse it. reason to say so, you send back an object of type {filterName: filterValue}

When I receive the property I have to do something like:

filtersHandle(itemObject) {
      for (let [k, v] of Object.entries(itemObject)) {
        this.$refs.crudTable.params[k] = v;
        this.$refs.crudTable.dataChangeHandler();
      }
    },

This is something could work better if we get something like:

filtersHandle(key, value) {

    },

I mean, will be a bit cleaner and we can work an easy approach by simply if key === 'myFilter Or maybe you can suggest a better approach Im not aware of.

Thanks again for this great package, makes life easier.