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

Method render

docs/examples/force-suggest.tsx:43–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 };
42
43 render() {
44 const { data, value, disabled } = this.state;
45 const options = data.map((d) => (
46 <Option key={d.value}>
47 <i>{d.text}</i>
48 </Option>
49 ));
50 return (
51 <div>
52 <h2>force suggest</h2>
53 <p>
54 <button type="button" onClick={this.toggleDisabled}>
55 toggle disabled
56 </button>
57 </p>
58 <div>
59 <Select
60 labelInValue
61 showSearch
62 onSearch={this.fetchData}
63 disabled={disabled}
64 value={value}
65 optionLabelProp="children"
66 placeholder="placeholder"
67 defaultActiveFirstOption
68 style={{ width: 500 }}
69 onChange={this.onChange}
70 filterOption={false}
71 >
72 {options}
73 </Select>
74 </div>
75 </div>
76 );
77 }
78}
79
80export default Test;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected