ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

Custom filtering or manage requests yourself possible? #126

Open arddor opened 7 years ago

arddor commented 7 years ago

I have read through the documentation and there are still two questions open for my use case.

  1. I need additional filtering, a date range picker together with the search filter
  2. I would need the filtered data separately to show some statistics in graphs

I assume that this is not possible. However would it be possible to manage the data fetching myself based on listening for actions and then passing the data in explicitly?

ratiw commented 7 years ago

@arddor I'm not quite sure what you mean. But is this what you're looking for?

arddor commented 7 years ago

I don't think so. If I understood the intention of the module right data fetching is done through it. Filtering is done through Search which does a textual search. What I would need is an additional filter field for time range.

Secondly the data which is fetched from vue-table I would need to access them for additional visualization in graphs, e.g. considering the example I would like to show a Pie Chart showing percentage of male / female based on the items in the table.

To summarise it:

  1. Can other filters apart from text search be defined?
  2. Can I somehow access the data fetched from vue-table
ratiw commented 7 years ago

@arddor Actually, all filtering are done from the server. vuetable always work with the server side (via api-url prop) to request the data. In order for the filtering to work, the given API must support that via filter query string.

So,

  1. you can filter anything as long as your API support it.
  2. you can access the data fetched via tableData. see here