import React from "react"; import { StyledProps } from "../_type"; import { ControlledProps } from "../form"; import { CommonDropdownProps, DropdownProps } from "../dropdown"; import { SelectOptionWithGroup } from "../select/SelectOption"; import { TagSelectBoxProps } from "./TagSelectBox"; export interface TagSelectProps extends ControlledProps, Omit, StyledProps { /** * 下拉选项列表 */ options?: SelectOptionWithGroup[]; /** * 是否仅能选择 `options` 中的值 * * @default false */ optionsOnly?: boolean; /** * 分组 * @since 2.3.0 */ groups?: { [groupKey: string]: React.ReactNode; }; /** * 自定义搜索筛选规则 * * 默认根据输入值筛选 */ filter?: (inputValue: string, option: SelectOptionWithGroup) => boolean; /** * 是否禁用 * @default false * @since 2.4.1 */ disabled?: boolean; /** * 搜索值变化回调 */ onSearch?: (inputValue: string) => void; /** * 输入框中的提示 * @default "请选择"(已处理国际化) */ placeholder?: string; /** * 弹出区域自定义类名 */ boxClassName?: DropdownProps["boxClassName"]; /** * 弹出区域自定义样式 */ boxStyle?: DropdownProps["boxStyle"]; /** * 状态提示 * * 可使用字符串或 [StatusTip](/component/tips) 相关组件 */ tips?: React.ReactNode; /** * 是否在选项选中后自动清空搜索值 * @default true */ autoClearSearchValue?: boolean; /** * 滚动到底部事件 * @since 2.1.0 */ onScrollBottom?: TagSelectBoxProps["onScrollBottom"]; /** * 当输入框获得焦点时调用此函数 */ onFocus?: (e: React.FocusEvent) => void; /** * 当输入框获得焦点时调用此函数 * @since 2.7.0 */ onBlur?: (e: React.FocusEvent) => void; /** * 弹出区域底部内容 * @since 2.7.0 */ footer?: React.ReactNode; /** * 隐藏 Tag 上关闭按钮 * @default false * @since 2.7.3 */ hideCloseButton?: boolean; /** * 删除单个标签的回调 * * 返回 `false` 阻止删除 * * @since 2.7.4 */ onDeleteTag?: (tag: SelectOptionWithGroup) => Promise | boolean; } export declare const TagSelect: React.FunctionComponent> & { defaultLabelAlign: string; };