MCPcopy Index your code
hub / github.com/reactstrap/reactstrap / onClick

Method onClick

src/DropdownItem.js:29–43  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

27 }
28
29 onClick(e) {
30 const { disabled, header, divider, text } = this.props;
31 if (disabled || header || divider || text) {
32 e.preventDefault();
33 return;
34 }
35
36 if (this.props.onClick) {
37 this.props.onClick(e);
38 }
39
40 if (this.props.toggle ?? true) {
41 this.context.toggle(e);
42 }
43 }
44
45 getRole() {
46 if (this.context.menuRole === 'listbox') {

Callers

nothing calls this directly

Calls 1

toggleMethod · 0.45

Tested by

no test coverage detected