import { AllI18nKeys, Localization } from "@Component/Localization/Localization"; import { Callout, DirectionalHint, Icon } from "@fluentui/react"; import { Component, ReactNode, RefObject } from "react"; import "./ComboList.scss"; interface IDisplayItem { i18nOption?: Record; i18n: AllI18nKeys; key: string; } interface IComboListProps { target?: RefObject; item: IDisplayItem[]; focus?: IDisplayItem; noData?: AllI18nKeys; dismiss?: () => any; click?: (item: IDisplayItem) => any; } class ComboList extends Component { private renderString(item: IDisplayItem) { const isFocus = item.key === this.props.focus?.key; return
{ if (this.props.click) { this.props.click(item) } }} >
; } public render(): ReactNode { return
{ this.props.item.map((item) => this.renderString(item)) } { this.props.item.length <= 0 ? : null }
} } export { ComboList, IDisplayItem }