You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we are adding options at some moment we move through virtualization threshold. In this moment view scrolls to top of the options list. It looks strange in async selects, because we always load new pages of options.
@korvin89 as for me, the error comes from this expression already const virtualized = filteredOptions.length >= virtualizationThreshold;
since it is obvious that the number of options will often be less than virtualizationThreshold and at the moment when the number of options becomes more than the virtualizationThreshold, it will cause the component to be rerender and this function will work private renderItems() { if (this.props.virtualized) { return this.renderVirtualizedContainer(); } else { return this.renderSimpleContainer(); } }
I suggest passing the virtualized property for the Select component if we want to use onLoadMore or add a new ItemCount property where we will specify the total number of options, often the total number comes via the API.
through the itemCount was done, and in the material ui
When we are adding options at some moment we move through virtualization threshold. In this moment view scrolls to top of the options list. It looks strange in async selects, because we always load new pages of options.
Code to reproduce:
https://codesandbox.io/p/sandbox/s2jvw5
Video:
https://github.com/user-attachments/assets/394c7ced-93d5-4b00-b080-c627ae3244d2
The text was updated successfully, but these errors were encountered: