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

Function onCheckboxBtnClick

stories/examples/ButtonGroup/StatefulExample.js:8–16  ·  view source on GitHub ↗
(selected)

Source from the content-addressed store, hash-verified

6 const [rSelected, setRSelected] = useState(null);
7
8 const onCheckboxBtnClick = (selected) => {
9 const index = cSelected.indexOf(selected);
10 if (index < 0) {
11 cSelected.push(selected);
12 } else {
13 cSelected.splice(index, 1);
14 }
15 setCSelected([...cSelected]);
16 };
17 return (
18 <div>
19 <h5>Radio Buttons</h5>

Callers 1

StatefulExample.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…