I am trying to create a select with material-ui that give a range of number from 0 - 20,000,000 in 25,000 increments. I was able to achieve this with a for loop
for (let price = 0; price <= 20000000; price = price + 25000) {
priceOptions.push({ id: price, title: `$${price.toLocaleString()}` });
}
I feel like this is not the best way to go about it as it takes a 2-3 seconds when you click on the dropdown for to display the options.
If anyone has an idea of how to speed this up it would be greatly appreciated.
As NearHuscarl mentioned in the comments:
You can integrate
Selectcomponent with some virtualized library likereact-virtualized. Personally, I'd use theAutocompletecomponent and tell the user to filter it out.