Skip to content

How to use specific filter for specific row? #44

Answered by vincjo
azern32 asked this question in Q&A
Discussion options

You must be logged in to vote

Thx for asking.
I found an issue when a 0 value is passed to a filter. 0 is considered as nullish so it resets the filter instead of applying it.

I just fixed it and published 1.11.3

Your question raises an interesting point. Currently there is no support for a multi-criteria filter. A column can only be filtered by 1 modality.
it will be interesting to allow many criteria filter for the same column.

In the meantime, I suggest you using radio buttons.
That being said, if your column contains only 0s and 1s, it is possible to use checkboxes.
Made a small example to illustrate:
https://vincjo.fr/datatables/test/checkbox-filter

CheckboxFilter.svelte

<script lang="ts">
    import type { DataH…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by azern32
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants