Hi all,
Want to share an issue which happened on my project after updating the package from 2.17.3 to 2.18.0 version, which forced me to downgrade the version.
I am using Saturation, Hue and EditableInput components wrapped by CustomPicker.
Seems like in 2.18.0 version the onChange method is broken and the value is not updating correctly which causes a UI bug.
Here is a simplified snippet from my code.
Thanks in advance
`const MyPicker = ({ hsl, onChange, hsv, hex }) => {
const changePicker = useCallback((e) => {
onChange(e);
// Some local state management
}, []);
const changeInputValue = useCallback((e) => {
if (typeof onChange === 'function') {
onChange(e.hex);
}
}, [onChange]);
const pickerProps = {
hsl,
};
const saturationProps = {
...pickerProps,
hsv,
};
return (
<div className={classes.colorPickerContainer}>
<Saturation {...saturationProps} onChange={changePicker}/>
<Hue {...pickerProps} onChange={changePicker}/>
<EditableInput value={hex ? hex.slice(1) : 0} label={'hex'} onChange={changeInputValue} />
</div>
);
};
export default memo(CustomPicker(MyPicker));`
have same issue, version 2.18
I'm using Saturation, EditableInput, Hue
color itself is changing, but UI of components is "frozen"
Same issue on 2.18, and all other versions. Using SliderPicker with react 16.3.
Slider and every draggable component seems frozen.
We've had to pin our version to 2.17.3 in order to not get the frozen UI.
I have a different issue where the application works fine while working on development mode (client-side rendering) but it totally crashing the application on the production (server-side rendering).
Somehow the CustomPicker function doesn't return anything at all and causing the crash. I've been getting react minified error #152.
I tried the suggested 2.17.3 version but the issue persisted
This has been fixed and will be release in [email protected]
@casesandberg I'm still seeing this same issue in v2.18.1 where onChange is not propagating the new color result in the Saturation component (hue is working fine).
Thank you, reverting to 2.17.3 fixed my issue.
Still seeing this issue on 2.19.3
Most helpful comment
@casesandberg I'm still seeing this same issue in
v2.18.1whereonChangeis not propagating the new color result in the Saturation component (hue is working fine).