How to have a mix of explicit numeric menu filters and useNumericMenu() hook based filters #6551
-
Let's say I have two numeric attributes. For one of them, I construct the UI using For the other, I don't have a range. Instead the user can input a single number, and I attempt to fetch records having a value greater than or equal to the entered value. For this one, I figure I can use the When I do this, I get an error though:
I find that if I don't use the numericFilters props on the Configure component, this error goes away - I guess it is trying to say that I am using both ways to set the numericFilters (even if they are different attributes) - and they conflict. Which is ok - but how do I fix it. Do I need to manually track both the numeric filters myself - and set them both through Configure component - or something else? Is there a better way to represent the second numeric attribute - the one without a range... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, that's because the whole parameter is considered controlled by the numericMenu widget. I believe you have a couple options:
|
Beta Was this translation helpful? Give feedback.
Yes, that's because the whole parameter is considered controlled by the numericMenu widget. I believe you have a couple options:
useNumericMenu
to set your custom parameters (you can set a start or an end only, depending on your use case that may work)useRange
if that fits your use caseConfigure
, but usefilters
instead ofnumericFilters