ratiw / vuetable-2-tutorial

MIT License
258 stars 67 forks source link

Custom dropdown filters #51

Closed cosecantt closed 7 years ago

cosecantt commented 7 years ago

I am not quite sure if we can add some custom dropdown filters?

User selects an item from dropdown it just filters based on given dropdown item. Then when a user searches items it searches among filtered items like given in the example below. Below is implemented in jQuery datatable. Tutorial examples would be great. screenhunter_80 jun 13 09 58

Thank you again for vuetable. It is very useful!

ratiw commented 7 years ago

@cosecantt Yes, you can.

Think about it, the dropdown itself is a predefined set of filters. That means it's just another type of filter that your backend API has to deal with. You just need to make Vuetable sent this filter to your backend via append-params.

You should first think about the query string that your backend API will receive and work with.

  http://example.com/api/products?group=drink&subgroup=all&filter=co

These can be used to program into apppend-params prop.

cosecantt commented 7 years ago

Ok @ratiw thank you. I definately look into that. Thank you again.

chaymag commented 6 years ago

Hello how did you manage to add these filters please ?