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

Method render

docs/examples/multiple.tsx:64–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 };
63
64 render() {
65 const { useAnim, loading, value, suffixIcon } = this.state;
66 return (
67 <div>
68 <h2>multiple select(scroll the menu)</h2>
69
70 <p>
71 <label htmlFor="useAnim">
72 anim
73 <input id="useAnim" checked={useAnim} type="checkbox" onChange={this.useAnim} />
74 </label>
75 <p />
76 <label htmlFor="showArrow">
77 showArrow
78 <input
79 id="showArrow"
80 checked={!!suffixIcon}
81 type="checkbox"
82 onChange={this.showArrow}
83 />
84 </label>
85 </p>
86 <p>
87 <label htmlFor="loading">
88 loading
89 <input id="loading" checked={loading} type="checkbox" onChange={this.loading} />
90 </label>
91 </p>
92
93 <div style={{ width: 300 }}>
94 <Select
95 autoFocus
96 value={value}
97 animation={useAnim ? 'slide-up' : null}
98 choiceTransitionName="rc-select-selection__choice-zoom"
99 style={{ width: 500 }}
100 mode="multiple"
101 loading={loading}
102 suffixIcon={suffixIcon}
103 allowClear
104 optionFilterProp="children"
105 optionLabelProp="children"
106 onSelect={this.onSelect}
107 onDeselect={this.onDeselect}
108 placeholder="please select"
109 onChange={this.onChange}
110 onFocus={() => console.log('focus')}
111 onBlur={(v) => console.log('blur', v)}
112 tokenSeparators={[' ', ',']}
113 >
114 {children}
115 </Select>
116 </div>
117
118 <h2>multiple select with autoClearSearchValue = false</h2>
119 <div style={{ width: 300 }}>
120 <Select
121 value={value}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected