How can I use a RangeInput with 2 attributes instead

I have an application containing item listings where each listing has a minimumPrice and maximumPrice. So every object in my algolia database has a numeric minimumPrice and maximumPrice attribute.

Now on my frontend, I want to apply a RangeInput that takes a min and max user input to refine a users search using both attributes instead of one. This is the way I want my implementation to work:

  • when a user inputs a user_min, it should refine the search to any data that has a user_min<maximumPrice_val
  • when a user inputs a user_max, it should refine the search to any data that has a user_max > minimumPrice_val
  • when a user inputs a user_min and a user_max, it should refine the search to any data that has user_min<maximumPrice_val AND user_max > minimumPrice_val (the intersection)

Would this be possible to do at all? Either with a rangeInput or a custom widget. I’d really appreciate any help on this. Thanks in advance! :slight_smile: