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

Function componentDidUpdate

src/Offcanvas.js:130–146  ·  view source on GitHub ↗
(prevProps, prevState)

Source from the content-addressed store, hash-verified

128 }
129
130 componentDidUpdate(prevProps, prevState) {
131 if (this.props.isOpen && !prevProps.isOpen) {
132 this.init();
133 this.setState({ isOpen: true });
134
135 return;
136 }
137
138 // now Offcanvas Dialog is rendered and we can refer this._element and this._dialog
139 if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {
140 this.setFocus();
141 }
142
143 if (this._element && prevProps.zIndex !== this.props.zIndex) {
144 this._element.style.zIndex = this.props.zIndex;
145 }
146 }
147
148 componentWillUnmount() {
149 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…