Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

range_number_slider reset will omit empty values #613

Open
TauPan opened this issue Feb 10, 2020 · 0 comments
Open

range_number_slider reset will omit empty values #613

TauPan opened this issue Feb 10, 2020 · 0 comments

Comments

@TauPan
Copy link
Contributor

TauPan commented Feb 10, 2020

Not sure if this is a bug or a feature request.

(Test page: Sorry, not a public project. I'd have to see if I can come up with a minimal example if you can't reproduce this.)

I have a django application which filters float ranges for values that can also be null.

The yadcf initialisation options look like this for the respective column:

      {column_number: 7,
       filter_type: 'range_number_slider',
       data: [0.0, 10.0],
       filter_plugin_options: {step: 0.1},
       filter_delay: 1000
      },

Before I touch the sliders, the rows null values are displayed in the datatable.

Corresponding part of query looks like this:

columns[7][data]: cvss2a__e_score
columns[7][name]: 
columns[7][searchable]: true
columns[7][orderable]: true
columns[7][search][value]: 
columns[7][search][regex]: false

especially [search][value] is empty.

As soon as I select either a min or max range, the unset values disappear, which is ok (because I want to have the proper range).

Corresponding part of query looks like this:

columns[7][data]: cvss2a__e_score
columns[7][name]: 
columns[7][searchable]: true
columns[7][orderable]: true
columns[7][search][value]: 0-yadcf_delim-8.8
columns[7][search][regex]: false

Now if I click on the small x to reset the column filter to the default, I'd like to be able to see the null columns again. But instead the filter is reset to the configured min/max values and the rows with unset scores are still filtered out.

Corresponding part of query looks like this

columns[7][data]: cvss2a__e_score
columns[7][name]: 
columns[7][searchable]: true
columns[7][orderable]: true
columns[7][search][value]: 0-yadcf_delim-10
columns[7][search][regex]: false

I'd like the [search][value] to become empty again here but I see no way to configure this and I admit I don't understand what's happening in the code in rangeNumberSliderClear as opposed to addRangeNumberFilter and/or addRangeNumberAndSliderFilterCapability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant