CustomPicker broken on 2.18.0 version
See original GitHub issueHi 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));`
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Android App Changelog - ownCloud
Upgrading from 2.18 or older versions made the app crash due to camera uploads ... The following sections list the changes in ownCloud...
Read more >office-ui-fabric-react - UNPKG
640, "version": "7.149.3",. 641, "comments": {. 642, "patch": [. 643, {. 644, "comment": "SplitButton: Fix ariaDescription behavior so that it is correctly ...
Read more >react-color: Versions - Openbase
Full version history for react-color including change logs. ... (BlockPicker): fixes blockpicker input not working: #616 ... 2.18.0. 3 years ago ...
Read more >:art: Color Pickers from Sketch, Photoshop, Chrome, Github ...
Hence its does not allow us to choose a color in the latest version 2.18.0. Everything works fine on rolling back to 2.17.3....
Read more >A highly customizable Flutter color picker.
Pub Version GitHub Workflow Status (event) Test codecov License ... If you enabled the custom picker and have not provided any custom color ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@casesandberg I’m still seeing this same issue in
v2.18.1
whereonChange
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.