mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
Combobox: only render ScrollContainer
when menu is open (#96271)
only render ScrollContainer when menu is open
This commit is contained in:
parent
69a38c634c
commit
265342fbae
@ -375,8 +375,9 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
|
||||
'aria-labelledby': ariaLabelledBy,
|
||||
})}
|
||||
>
|
||||
{isOpen && (
|
||||
<ScrollContainer showScrollIndicators maxHeight="inherit" ref={scrollRef}>
|
||||
{isOpen && !asyncError && (
|
||||
{!asyncError && (
|
||||
<ul style={{ height: rowVirtualizer.getTotalSize() }} className={styles.menuUlContainer}>
|
||||
{rowVirtualizer.getVirtualItems().map((virtualRow) => {
|
||||
return (
|
||||
@ -424,6 +425,7 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
|
||||
)}
|
||||
</div>
|
||||
</ScrollContainer>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user