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

Don't query default nsites and nelements values #178

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

CasperWA
Copy link
Owner

@CasperWA CasperWA commented Oct 1, 2020

This work is inspired by issue #125, in the sense that COD was failing to handle nsites, and this is added by default even if the user has not changed it. There is no need to add a query for a non-filter. Hence, this PR will make sure to not add nsites and nelements to the query filter if they are equal to their initial values.

A custom IntRangeSlider widget is implemented to handle returning a None value.
The custom IntRangeSlider widget simply implements a get_value() function that is used instead of getting the value attribute, which. It will return (None, None) if the values are equal to the min and max attributes, respectively. If only one value is altered the other will be None.

This is to minimize query parameters in a given query.
The custom IntRangeSlider widget implements a `get_value()` function
that is used instead of getting the `value` attribute, which will return
`(None, None)` if the values are equal to the `min` and `max`
attributes, respectively.
@CasperWA CasperWA force-pushed the dont_query_default_nsites_nelements branch from c9fc16e to 329e01b Compare October 2, 2020 09:40
@CasperWA CasperWA merged commit 6e123d0 into develop Oct 2, 2020
@CasperWA CasperWA deleted the dont_query_default_nsites_nelements branch October 2, 2020 09:45
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

Successfully merging this pull request may close these issues.

None yet

1 participant