UNPKG

zent

Version:

一套前端设计语言和基于React的实现

31 lines (30 loc) 1.06 kB
import { Component } from 'react'; import { IMenuListItem } from './MenuListItem'; export interface IMenuListProps { items?: IMenuListItem[]; onRequestClose?: () => void; } export interface IMenuListState { focusIdx: number | null; autoScrollFocusIdx?: number; open?: boolean; } export default class MenuList extends Component<IMenuListProps, IMenuListState> { private refMenuScrollContainer; private refMenuItemList; constructor(props: any); componentDidUpdate(): void; autoScroll(): void; onKeyDown: (e: any) => void; setFocusIndex: (focusIdx: number | null, autoScroll?: boolean) => void; getItemIdxInItems: (idx: number) => number; getValidItemIdx: (idx: number, searchDown?: boolean) => number; getTopMenu: () => this; moveFocusIndex: (offset: number) => void; moveFocusIndexDown: () => void; moveFocusIndexUp: () => void; selectCurrentFocusIndex: (e: any) => void; close: () => void; renderItems: (items?: IMenuListItem[]) => JSX.Element[]; render(): JSX.Element; }