Skip to content

Commit

Permalink
Fix #3641: Checkbox fix disabled pointer (#3642)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Nov 14, 2022
1 parent edd041a commit 959f77d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/lib/checkbox/Checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
position: relative;
}

.p-checkbox.p-checkbox-disabled {
cursor: auto;
}

.p-checkbox-box {
display: flex;
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multistatecheckbox/MultiStateCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const MultiStateCheckbox = React.memo(
const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, MultiStateCheckbox.defaultProps);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames('p-multistatecheckbox p-checkbox p-component', props.className);
const className = classNames('p-multistatecheckbox p-checkbox p-component', props.className, { 'p-checkbox-disabled': props.disabled });
const boxClassName = classNames(
'p-checkbox-box',
{
Expand Down
2 changes: 1 addition & 1 deletion components/lib/tristatecheckbox/TriStateCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const TriStateCheckbox = React.memo(
const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, TriStateCheckbox.defaultProps);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames('p-tristatecheckbox p-checkbox p-component', props.className);
const className = classNames('p-tristatecheckbox p-checkbox p-component', props.className, { 'p-checkbox-disabled': props.disabled });
const boxClassName = classNames('p-checkbox-box', {
'p-highlight': (props.value || !props.value) && props.value !== null,
'p-disabled': props.disabled,
Expand Down

0 comments on commit 959f77d

Please sign in to comment.