feat: plugin auto upgrade strategy (#19758)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Novice <novice12185727@gmail.com>
This commit is contained in:
parent
e6913744ae
commit
eaae79a581
305 changed files with 2524 additions and 581 deletions
|
|
@ -4,18 +4,21 @@ import cn from '@/utils/classnames'
|
|||
type OptionListItemProps = {
|
||||
isSelected: boolean
|
||||
onClick: () => void
|
||||
noAutoScroll?: boolean
|
||||
} & React.LiHTMLAttributes<HTMLLIElement>
|
||||
|
||||
const OptionListItem: FC<OptionListItemProps> = ({
|
||||
isSelected,
|
||||
onClick,
|
||||
noAutoScroll,
|
||||
children,
|
||||
}) => {
|
||||
const listItemRef = useRef<HTMLLIElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (isSelected)
|
||||
if (isSelected && !noAutoScroll)
|
||||
listItemRef.current?.scrollIntoView({ behavior: 'instant' })
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue