How to catch 'hide.bs.tab' event for tabs in React-Bootstrap -
due docs react-bootstrap supports onselect method tabs fires once tab switch tab. looking similar native twitter bootstrap event hide.bs.tab determine moment when tab starts closing.
i found utilities onexit method, doesn't work tabs, me.
how that?
actually, onselect
fires (if provided prop) tab selected, not after switched to. handler's job switch active tab (or not), perhaps after loading additional information through wire, , on.
an excerpt react-bootstrap code:
if (this.props.onselect) { this._ischanging = true; this.props.onselect(selectedkey); this._ischanging = false; return; }
then followed built-in tab switching if hadn't provided onselect
.
for example, custom onselect
handler display spinner, fetch data goes in new tab, , once that's done hide spinner , switch active tab one, using activekey
prop.
Comments
Post a Comment