mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
fix: scroll the listbox into viewport before the search box is shown (#1865)
This commit is contained in:
@@ -200,6 +200,13 @@ function ListBoxInline({ options, layout }) {
|
||||
const handleShowSearch = () => {
|
||||
const newValue = !showSearch;
|
||||
setShowSearch(newValue);
|
||||
if (newValue && containerRef.current?.scrollIntoView) {
|
||||
containerRef.current.scrollIntoView({
|
||||
block: 'nearest',
|
||||
inline: 'nearest',
|
||||
behavior: 'instant',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const onCtrlF = () => {
|
||||
|
||||
Reference in New Issue
Block a user