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

Function addTargetEvents

src/TooltipPopoverWrapper.js:274–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

272 }
273
274 addTargetEvents() {
275 if (this.props.trigger) {
276 let triggers = this.props.trigger.split(' ');
277 if (triggers.indexOf('manual') === -1) {
278 if (triggers.indexOf('click') > -1 || triggers.indexOf('legacy') > -1) {
279 document.addEventListener('click', this.handleDocumentClick, true);
280 }
281
282 if (this._targets && this._targets.length) {
283 if (triggers.indexOf('hover') > -1) {
284 this.addEventOnTargets('mouseover', this.showWithDelay, true);
285 this.addEventOnTargets('mouseout', this.hideWithDelay, true);
286 }
287 if (triggers.indexOf('focus') > -1) {
288 this.addEventOnTargets('focusin', this.show, true);
289 this.addEventOnTargets('focusout', this.hide, true);
290 }
291 this.addEventOnTargets('keydown', this.onEscKeyDown, true);
292 }
293 }
294 }
295 }
296
297 removeTargetEvents() {
298 if (this._targets) {

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…