Skip to content
Merged
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
7 changes: 2 additions & 5 deletions src/OptionList/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import pickAttrs from '@rc-component/util/lib/pickAttrs';
import type { DefaultOptionType, SingleValueType } from '../Cascader';
import CascaderContext from '../context';
import { SEARCH_MARK } from '../hooks/useSearchOptions';
import { isLeaf, toPathKey } from '../utils/commonUtil';
import { isLeaf, scrollIntoParentView, toPathKey } from '../utils/commonUtil';
import Checkbox from './Checkbox';

export const FIX_LABEL = '__cascader_fix_label__';
Expand Down Expand Up @@ -110,10 +110,7 @@ export default function Column<OptionType extends DefaultOptionType = DefaultOpt
const activeElement = menuRef.current.querySelector<HTMLElement>(selector);

if (activeElement) {
activeElement.scrollIntoView({
block: 'nearest',
inline: 'nearest',
});
scrollIntoParentView(activeElement);
Comment thread
tuzixiangs marked this conversation as resolved.
}
}
}, [activeValue, menuItemPrefixCls]);
Expand Down
Loading