kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Fix color picker closing on toggle
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>environments/review-develop-3zknud/deployments/586^2
rodzic
827146ad17
commit
15852154c5
|
@ -28,12 +28,14 @@ const ColorWithPicker: React.FC<IColorWithPicker> = ({ buttonId, value, onChange
|
|||
setPlacement(isMobile(window.innerWidth) ? 'bottom' : 'right');
|
||||
};
|
||||
|
||||
const onToggle: React.MouseEventHandler = () => {
|
||||
const onToggle: React.MouseEventHandler = (e) => {
|
||||
if (active) {
|
||||
hidePicker();
|
||||
} else {
|
||||
showPicker();
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
Ładowanie…
Reference in New Issue