I have this list of products here, and I want to filter them according to the salary value.
This salary value needs to be in a numeric range. So:
- I create a numeric range custom state (I do this because in the original app I take the values from a reusable element, so the custom state must be in the logic of the app)
– when the apply button is clicked the custom states numeric range value is updated according to the values entered. - Then I use the min and max of this custom state to filter for the results.
However, I get empty results at first. Moreover, when I write values in the min and max field I do get results when I press it.
Does anyone know why this happens?