(e, forWithGrant)
| 73 | }); |
| 74 | |
| 75 | const onCheckAll = (e, forWithGrant)=>{ |
| 76 | let newValue = []; |
| 77 | /* Push all the privs or ignore if unchecked and return empty */ |
| 78 | realVal.forEach((v)=>{ |
| 79 | if(forWithGrant) { |
| 80 | newValue.push({ |
| 81 | ...v, |
| 82 | privilege: true, |
| 83 | with_grant: e.target.checked, |
| 84 | }); |
| 85 | } else if(e.target.checked) { |
| 86 | newValue.push({ |
| 87 | ...v, |
| 88 | privilege: e.target.checked, |
| 89 | }); |
| 90 | } |
| 91 | }); |
| 92 | onChange(newValue); |
| 93 | }; |
| 94 | |
| 95 | const onCheck = (e, forWithGrant)=>{ |
| 96 | let exists = false; |