You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Tried to implement ColorPicker with the condition of only allowing the popover to open under specific circumstances. I noticed there wasn't a clear way to prevent users from opening the popover.
Describe the solution you'd like
I'd like to push up a PR with changes that include:
adding a disabled prop with type boolean for ColorPicker; and
adding a guard clause to handleClick in ColorPicker to prevent the opening of the popover
const handleClick = () => {
if (disabled) return;
const b = Boolean(refPicker.current);
setOpen(b);
if (onOpen) onOpen(b);
};
This is a minimal and straightforward fix to the aforementioned problem.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Tried to implement
ColorPicker
with the condition of only allowing the popover to open under specific circumstances. I noticed there wasn't a clear way to prevent users from opening the popover.Describe the solution you'd like
I'd like to push up a PR with changes that include:
disabled
prop with typeboolean
forColorPicker
; andhandleClick
inColorPicker
to prevent the opening of the popoverThis is a minimal and straightforward fix to the aforementioned problem.
The text was updated successfully, but these errors were encountered: