Open aplatformdev opened 1 week ago
Tried recreating the issue in a couple different environments. I think I narrowed it down to the following:
Seems this issue is a result of the vendored react@19
that comes with next@15
. React removed support for defaultProps in v19.
This means that ideally react-color
would use the new ES6 syntax, but this is highly unlikely. I'll suggest a PR here to explicitly pass in props to the Checkboard
component, but I'd recommend going ahead and patching either dependency in the meantime.
Describe the bug
I have been using the
color-input
plugin successfully in many projects. But since updating toSanity 3.61.0
I cannot use it. When opening acolor-input
in sanity studio, the following error occurs:Error: Cannot read properties of undefined (reading 'canvas')
(Please see screenshot below)sanity.config.ts:
Usage:
defineField({ name: 'bgColor', title: 'Background Color', type: 'color', group: 'editorial', }),
package.json
To Reproduce
Steps to reproduce the behavior:
color
typeExpected behavior
I expect the
color-input
to render the inputs and to be able to select a color and for it to be saved to the document in question.Screenshots
Which versions of Sanity are you using?
3.61.0
Which versions of Node.js / npm are you running?
10.2.4
v21.6.2