Closed maxwelllharper closed 2 years ago
Hey @Refractive-Strategy, thank you for pointing this out. Would you please post a screenshot of your code, specifically where you initially declare the useColorPicker hook. i.e. const { selectedPoint } = useCol...
I believe that you may have forgotten to pass in the value & callback. The correct syntax is:
const { selectedPoint, deletePoint } = useColorPicker(value, callback)
OK: FIXED with your hint. Thank you,
EXPLANATION: We implemented a state saving structure/flow that has us saving this state outside of this component and in fact to an external API... I have now passed the proper value, and callback. It seems to be working properly now.
It would seem that '
selectedPoint
' and 'deletePoint
' is no longer working in v=2.0.21The '
selectedPoint
' only returns a 0 no matter which point is selected. And even when a 0 is passed intodeletePoint()
it returns an error saying "A gradient must have at least 2 colors, disable your delete button..."-- The trash-can 'delete point' that's part of the component's inherent controls still works though.