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

Method returnFunction

src/DropdownToggle.js:103–121  ·  view source on GitHub ↗
({ ref })

Source from the content-addressed store, hash-verified

101
102 // extracted the rendering of the Tag component
103 const returnFunction = ({ ref }) => {
104 const handleRef = (tagRef) => {
105 ref(tagRef);
106 const { onToggleRef } = this.context;
107 if (onToggleRef) onToggleRef(tagRef);
108 };
109
110 return (
111 <Tag
112 {...props}
113 {...{ [typeof Tag === 'string' ? 'ref' : 'innerRef']: handleRef }}
114 className={classes}
115 onClick={this.onClick}
116 aria-expanded={this.context.isOpen}
117 aria-haspopup={this.getRole()}
118 children={children}
119 />
120 );
121 };
122
123 // No Reference component if the component is in Navbar
124 if (this.context.inNavbar) {

Callers

nothing calls this directly

Calls 1

getRoleMethod · 0.45

Tested by

no test coverage detected