Skip to content

Commit

Permalink
add condition to call the function correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Jul 2, 2024
1 parent bc33555 commit 14d15a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Capabilities/ItemActionCheckbox/ItemActionCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const ItemActionCheckbox = ({
aria-describedby="asterisk-policy-desc"
aria-label={getCheckboxAriaLabel(action, item.resource)}
onChange={event => {
onChangeCapabilityCheckbox?.(event, item.actions[action]);
if (onChangeCapabilityCheckbox) {
onChangeCapabilityCheckbox(event, item.actions[action]);
}
}}
readOnly={readOnly || isCapabilityDisabled?.(item.actions[action])}
checked={isCapabilitySelected(item.actions[action])}
Expand Down

0 comments on commit 14d15a9

Please sign in to comment.