MCPcopy Create free account
hub / github.com/react-component/select / Test

Function Test

docs/examples/multiple-with-maxCount.tsx:6–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import '../../assets/index.less';
5
6const Test: React.FC = () => {
7 const [value, setValue] = React.useState<string[]>(['1']);
8
9 const onChange = (v: any) => {
10 setValue(v);
11 };
12
13 return (
14 <>
15 <h2>Multiple with maxCount</h2>
16 <Select
17 maxCount={4}
18 mode="multiple"
19 value={value}
20 animation="slide-up"
21 choiceTransitionName="rc-select-selection__choice-zoom"
22 style={{ width: 500 }}
23 optionFilterProp="children"
24 optionLabelProp="children"
25 placeholder="please select"
26 onChange={onChange}
27 options={Array.from({ length: 20 }, (_, i) => ({
28 label: <span>中文{i}</span>,
29 value: i.toString(),
30 }))}
31 />
32 </>
33 );
34};
35
36export default Test;

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…