jacobworrel / react-windowed-select

An integration of react-window with react-select to efficiently render large lists.
MIT License
142 stars 38 forks source link

windowThreshold doesnt account for grouped options #8

Closed jacobworrel closed 5 years ago

jacobworrel commented 5 years ago

In the WindowedSelect component, we need to check whether the consumer is passing in a list of grouped options, and if so, count the number of grouped options to determine whether windowing should kick in via the windowThreshold prop.

const isWindowed = options.length >= windowThreshold;

needs to check if the first item has an "options" property and if so count the number of grouped options and determine if that number is greater than the windowThreshold.

jacobworrel commented 5 years ago

fixed by https://github.com/jacobworrel/react-windowed-select/pull/10