diff --git a/src/OptionList/Column.tsx b/src/OptionList/Column.tsx index 82ec25c..5805ab1 100644 --- a/src/OptionList/Column.tsx +++ b/src/OptionList/Column.tsx @@ -23,7 +23,6 @@ export interface ColumnProps; loadingKeys: React.Key[]; isSelectable: (option: DefaultOptionType) => boolean; - searchValue?: string; } export default function Column({ @@ -39,7 +38,6 @@ export default function Column) { const menuPrefixCls = `${prefixCls}-menu`; const menuItemPrefixCls = `${prefixCls}-menu-item`; @@ -117,7 +115,7 @@ export default function Column { // >>>>> Open const triggerOpenPath = () => { - if (disabled || searchValue) { + if (disabled) { return; } const nextValueCells = [...fullPath]; diff --git a/src/OptionList/List.tsx b/src/OptionList/List.tsx index 4beedd0..05410a5 100644 --- a/src/OptionList/List.tsx +++ b/src/OptionList/List.tsx @@ -166,6 +166,7 @@ const RawOptionList = React.forwardRef(( // >>>>> Active Scroll React.useEffect(() => { + if (searchValue) return; for (let i = 0; i < activeValueCells.length; i += 1) { const cellPath = activeValueCells.slice(0, i + 1); const cellKeyPath = toPathKey(cellPath); @@ -176,7 +177,7 @@ const RawOptionList = React.forwardRef(( scrollIntoParentView(ele); } } - }, [activeValueCells]); + }, [activeValueCells, searchValue]); // ========================== Render ========================== // >>>>> Empty @@ -213,7 +214,6 @@ const RawOptionList = React.forwardRef((