Closed Conni2461 closed 1 month ago
Hey, thx for your suggestion. I understand your point but can't figure out how we could achieve this.
For now I just added:
if ($filters.length > 0) {
$filters.forEach((filter) => {
return ($rawRows = $rawRows.filter((row) => {
const entry = filter.callback(row)
+ if (filter.identifier === 'car' && row['car']) {
+ row['car'] = row['car'].filter(item => {
+ return this.match(item, filter.value, filter.comparator)
+ })
+ }
return this.match(entry, filter.value, filter.comparator)
}))
})
this.pageNumber.set(1)
this.selected.set([])
this.event.trigger('change')
}
return $rawRows
in /lib/local/Context.ts createFilteredRows()
line 76
It works fine on "car" nested array but the initial values are erased after removing the filter.
Hey, first of all thanks for your awesome project. I really love it. I just have one minor issue with nested tables.
If you e.g. look at https://vincjo.fr/datatables/examples/nested-objects which has a nested car table, and then start filtering for "pt cru" i expect the nested table also to be filtered. So it should result in following table, where everything that is marked as blue blocks is no longer shown (image 2). Currently it looks like this (image 1).
Is this currently possible, or does this require changes/stuff here. If yes i would also be open to contributing these changes, if you are interested.