connectMultiRange: How to disable default 'All' category?

Hi all,

Quick question – when using MultiRange widget, React InstantSearch automatically creates an “All” category. Is there a way to disable this?


Got it!

For anyone else who encounters this: Use ‘transformItems’ exposed prop to filter out ‘all’ with a bit of lodash magic:

<FilterByDate attributeName="start_time"
              defaultRefinement={"" + now + ":" }
              transformItems={(filterItems) => {return _.reject(filterItems, {label: 'All'});}} />

Yep this or hide it using css, works also. Nice find!

The classname to hide it with css: ais-MultiRange__itemAll :slight_smile:

1 Like