Combobox: Menu places itself under topnav (#96545)

This commit is contained in:
Laura Fernández 2024-11-18 12:00:24 +01:00 committed by GitHub
parent 76444c7913
commit 30bbcf8200
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ import { AutoSizeInput } from '../Input/AutoSizeInput';
import { Input, Props as InputProps } from '../Input/Input';
import { Box } from '../Layout/Box/Box';
import { Stack } from '../Layout/Stack/Stack';
import { Portal } from '../Portal/Portal';
import { ScrollContainer } from '../ScrollContainer/ScrollContainer';
import { getComboboxStyles, MENU_OPTION_HEIGHT } from './getComboboxStyles';
@ -379,6 +380,7 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
placeholder,
})}
/>
<Portal>
<div
className={cx(styles.menu, !isOpen && styles.menuClosed)}
style={{
@ -441,6 +443,7 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
</ScrollContainer>
)}
</div>
</Portal>
</div>
);
};