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

Class Controlled

tests/Select.test.tsx:891–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889
890 it('Controlled onDropdownVisibleChange', () => {
891 class Controlled extends React.Component {
892 public state = {
893 open: true,
894 };
895
896 public onDropdownVisibleChange = (open) => {
897 this.setState({ open });
898 };
899
900 public render() {
901 return (
902 <Select open={this.state.open} onDropdownVisibleChange={this.onDropdownVisibleChange}>
903 <Option value="1">1</Option>
904 </Select>
905 );
906 }
907 }
908 const { container } = render(<Controlled />);
909 expectOpen(container);
910 toggleOpen(container);

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…