tdesign-react
Version:
TDesign Component for React
19 lines (18 loc) • 705 B
TypeScript
import React from 'react';
import { type InputRef } from '../input';
import type { SelectInputCommonProperties } from './interface';
import type { TdSelectInputProps } from './type';
export interface RenderSelectSingleInputParams {
tPlaceholder: string;
}
export default function useSingle(props: TdSelectInputProps): {
inputRef: React.MutableRefObject<InputRef>;
commonInputProps: SelectInputCommonProperties;
singleInputValue: string;
onInnerClear: (context: {
e: React.MouseEvent<SVGSVGElement>;
}) => void;
renderSelectSingle: (popupVisible: boolean, onInnerBlur?: (context: {
e: React.FocusEvent<HTMLInputElement>;
}) => void) => React.JSX.Element;
};