kouts / vue-dataset

A set of Vue.js components to display datasets (lists) with filtering, paging, and sorting capabilities!
https://next--vue-dataset-demo.netlify.app/
MIT License
220 stars 25 forks source link

Filter a row on multiple fields #123

Closed arcadeJHS closed 1 year ago

arcadeJHS commented 1 year ago

Pull request #124

I would like to filter rows depending on the value of two related fields. For instance, let's say we've got two fields, startDate and endDate

[
...
{ startDate: "2023-10-10T10:00:00", endDate: "2023-11-10T10:00:00" },
...
]

and I would like to filter that row if it's matching with today date:

startDate < Date.now() < endDate

Given the fact that currently each filter definition in "ds-filter-fields" receives the value of the key field only, is it possible, and how?

Thank you!

arcadeJHS commented 1 year ago

Pull request #124, merged in v3.6.0, solves the issue.