UNPKG

tdesign-react

Version:
27 lines (26 loc) 932 B
import React from 'react'; import type { StyledProps } from '../common'; import type { InputRef } from '../input'; import type { SelectInputCommonProperties } from './interface'; import type { TdSelectInputProps } from './type'; export interface RenderSelectMultipleParams { commonInputProps: SelectInputCommonProperties; popupVisible: boolean; allowInput: boolean; onInnerClear: (context: { e: React.MouseEvent<SVGElement>; }) => void; onInnerBlur?: (context: { e: React.FocusEvent<HTMLInputElement>; }) => void; } export interface SelectInputProps extends TdSelectInputProps, StyledProps { options?: any[]; } export default function useMultiple(props: SelectInputProps): { tags: any[]; tPlaceholder: string; tagInputRef: React.MutableRefObject<InputRef>; multipleInputValue: string; renderSelectMultiple: (p: RenderSelectMultipleParams) => React.JSX.Element; };