MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / onCheckAll

Function onCheckAll

web/pgadmin/static/js/components/Privilege.jsx:75–93  ·  view source on GitHub ↗
(e, forWithGrant)

Source from the content-addressed store, hash-verified

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;

Callers 1

PrivilegeFunction · 0.85

Calls 1

onChangeFunction · 0.50

Tested by

no test coverage detected