RangeInput for age with Unix timestamp crashes site

Hey :wave:

I’d like to be able to sort and filter our users by age. As pr the suggestion here, we added each user’s age as a Unix timestamp.

However, when I add a simple

<RangeInput attribute="birthday" />

and try to interact with it, the rest of the page becomes totally unresponsive, eventually prompting a chrome “Site is unresponsive, do you want to wait or close it” dialog. I’ve verified that it only happens when I add this single component, it works fine without it.

How can that be? Our user index contains around 11k users.

I’ve tested the site using the React Profiler, and there doesn’t seem to be any infinite render loops or anything, so I assume it’s got something to do with the logic behind the component.


PS: There doesn’t seem to be any TS typings for RangeProvided yet. Also, it doesn’t pass component props along in the connectors:

const RangeInput: React.FunctionComponent<Props>
export const ARRangeInput = connectRange(RangeInput);

converts types for ARRangeInput to ARRangeInput: React.ComponentClass<any, any>

Hi @jm1,

I created a React InstantSearch sandbox containing a RangeInput component on the price attribute. Could you please replicate the issue with your index in this sandbox and send the link back here? It’ll be easier to debug that together.

About the React InstantSearch typings, they’re only community driven for now so they might not be totally accurate. We’re in the process of migrating the codebase to TypeScript so they’ll be officially supported in the future.