Open inad9300 opened 2 months ago
AutoComplete component's Virtual Scroll internally uses VirtualScroller component.
if (props.virtualScrollerOptions) {
// ... rest
return <VirtualScroller ref={props.virtualScrollerRef} {...virtualScrollerProps} pt={_ptm('virtualScroller')} __parentMetadata={{ parent: props.metaData }} />;
}
Size of the viewport is configured usingscrollWidth, scrollHeight properties directly or with CSS width and height styles.
VirtualScroller component appears to maintain a fixed size regardless of the number of items
therefore, I am not certain whether this is a bug or not..
@melloware
to achieve the behavior intended in issue, it seems that modifications to VirtualScroller component might be necessary
however, considering the many components that use VirtualScroller, I'm not certain if this is the right approach..
If not, another option could be to update the documentation to inform users that resizing is not supported
thank you xD
Agreed the VirtualScroller is used throughout the library and three are various bugs reported against it but its a PrimeTek core component they use in many libraries so I am hestitant to touch it. I usually leave VirtualScroller issues to PrimeTek.
Describe the bug
Enabling virtual scrolling in
<AutoComplete />
has the following undesired side effect:Compare with the behavior without virtual scrolling:
Reproducer
https://primereact.org/autocomplete/#virtualscroll
System Information