()
| 2841 | } |
| 2842 | |
| 2843 | render() { |
| 2844 | return ( |
| 2845 | <div> |
| 2846 | <Form onSubmit={(e) => e.preventDefault()}> |
| 2847 | <FormGroup> |
| 2848 | <Label for="unmountOnClose">UnmountOnClose value</Label>{' '} |
| 2849 | <Input |
| 2850 | type="select" |
| 2851 | name="unmountOnClose" |
| 2852 | id="unmountOnClose" |
| 2853 | onChange={this.changeUnmountOnClose} |
| 2854 | > |
| 2855 | <option value="true">true</option> |
| 2856 | <option value="false">false</option> |
| 2857 | </Input> |
| 2858 | </FormGroup>{' '} |
| 2859 | <Button color="danger" onClick={this.toggle}> |
| 2860 | {this.props.buttonLabel} |
| 2861 | </Button> |
| 2862 | </Form> |
| 2863 | <Modal |
| 2864 | isOpen={this.state.modal} |
| 2865 | toggle={this.toggle} |
| 2866 | className={this.props.className} |
| 2867 | unmountOnClose={this.state.unmountOnClose} |
| 2868 | scrollable |
| 2869 | > |
| 2870 | <ModalHeader toggle={this.toggle}>Modal title</ModalHeader> |
| 2871 | <ModalBody> |
| 2872 | <Input |
| 2873 | type="textarea" |
| 2874 | placeholder="Write something (data should remain in modal if unmountOnClose is set to false)" |
| 2875 | rows={5} |
| 2876 | /> |
| 2877 | </ModalBody> |
| 2878 | <ModalFooter> |
| 2879 | <Button color="primary" onClick={this.toggle}> |
| 2880 | Do Something |
| 2881 | </Button>{' '} |
| 2882 | <Button color="secondary" onClick={this.toggle}> |
| 2883 | Cancel |
| 2884 | </Button> |
| 2885 | </ModalFooter> |
| 2886 | </Modal> |
| 2887 | </div> |
| 2888 | ); |
| 2889 | } |
| 2890 | } |
| 2891 | |
| 2892 | class ModalExampleFocusAfterClose extends React.Component<any, any> { |
nothing calls this directly
no outgoing calls
no test coverage detected