MCPcopy Create free account
hub / github.com/react-component/input / Demo

Function Demo

tests/BaseInput.test.tsx:56–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 const user = userEvent.setup();
55
56 const Demo: FC = () => {
57 const [value, setValue] = useState<string>('');
58
59 const handleReset = () => {
60 setValue('');
61 };
62
63 const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
64 onChange();
65 setValue(e.target.value);
66 };
67
68 return (
69 <BaseInput
70 prefixCls="rc-input"
71 allowClear={{ clearIcon: '✖' }}
72 value={value}
73 handleReset={handleReset}
74 >
75 <input onChange={handleChange} onBlur={onBlur} onFocus={onFocus} />
76 </BaseInput>
77 );
78 };
79
80 it('By click', () => {
81 const { container } = render(<Demo />);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…