MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / componentDidUpdate

Function componentDidUpdate

src/Modal.js:160–176  ·  view source on GitHub ↗
(prevProps, prevState)

Source from the content-addressed store, hash-verified

158 }
159
160 componentDidUpdate(prevProps, prevState) {
161 if (this.props.isOpen && !prevProps.isOpen) {
162 this.init();
163 this.setState({ isOpen: true });
164 // let render() renders Modal Dialog first
165 return;
166 }
167
168 // now Modal Dialog is rendered and we can refer this._element and this._dialog
169 if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {
170 this.setFocus();
171 }
172
173 if (this._element && prevProps.zIndex !== this.props.zIndex) {
174 this._element.style.zIndex = this.props.zIndex;
175 }
176 }
177
178 componentWillUnmount() {
179 this.clearBackdropAnimationTimeout();

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…