Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/OptionList/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface ColumnProps<OptionType extends DefaultOptionType = DefaultOptio
halfCheckedSet: Set<React.Key>;
loadingKeys: React.Key[];
isSelectable: (option: DefaultOptionType) => boolean;
searchValue?: string;
}

export default function Column<OptionType extends DefaultOptionType = DefaultOptionType>({
Expand All @@ -39,7 +38,6 @@ export default function Column<OptionType extends DefaultOptionType = DefaultOpt
halfCheckedSet,
loadingKeys,
isSelectable,
searchValue,
}: ColumnProps<OptionType>) {
const menuPrefixCls = `${prefixCls}-menu`;
const menuItemPrefixCls = `${prefixCls}-menu-item`;
Expand Down Expand Up @@ -117,7 +115,7 @@ export default function Column<OptionType extends DefaultOptionType = DefaultOpt
}) => {
// >>>>> Open
const triggerOpenPath = () => {
if (disabled || searchValue) {
if (disabled) {
return;
}
const nextValueCells = [...fullPath];
Expand Down
4 changes: 2 additions & 2 deletions src/OptionList/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const RawOptionList = React.forwardRef<RefOptionListProps, RawOptionListProps>((

// >>>>> Active Scroll
React.useEffect(() => {
if (searchValue) return;
Comment thread
afc163 marked this conversation as resolved.
Outdated
for (let i = 0; i < activeValueCells.length; i += 1) {
const cellPath = activeValueCells.slice(0, i + 1);
const cellKeyPath = toPathKey(cellPath);
Expand All @@ -176,7 +177,7 @@ const RawOptionList = React.forwardRef<RefOptionListProps, RawOptionListProps>((
scrollIntoParentView(ele);
}
}
}, [activeValueCells]);
}, [activeValueCells, searchValue]);

// ========================== Render ==========================
// >>>>> Empty
Expand Down Expand Up @@ -213,7 +214,6 @@ const RawOptionList = React.forwardRef<RefOptionListProps, RawOptionListProps>((
<Column
key={index}
{...columnProps}
searchValue={searchValue}
prefixCls={mergedPrefixCls}
options={col.options}
prevValuePath={prevValuePath}
Expand Down