You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a TypeError: Cannot read properties of null (reading 'getBoundingClientRect') error when using the Color component in my React application. This error occurs specifically when I try to select a color using the color picker. The application crashes, and the error message points to the leva.js file.
Steps to Reproduce
Integrate leva into a React application.
Use the useControls hook to create a Color input.
Attempt to select a color using the color picker.
Expected Behavior
The color picker should allow me to select a color without any errors, and the selected color should be reflected in the application state.
Actual Behavior
The application crashes with the following error message:
Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')
at leva.js:11054:30
at commitHookEffectListMount (chunk-QXLG2TGQ.js:16961:34)
at commitLayoutEffectOnFiber (chunk-QXLG2TGQ.js:17048:23)
at commitLayoutMountEffects_complete (chunk-QXLG2TGQ.js:18028:17)
at commitLayoutEffects_begin (chunk-QXLG2TGQ.js:18017:15)
at commitLayoutEffects (chunk-QXLG2TGQ.js:17968:11)
at commitRootImpl (chunk-QXLG2TGQ.js:19404:13)
at commitRoot (chunk-QXLG2TGQ.js:19328:13)
at performSyncWorkOnRoot (chunk-QXLG2TGQ.js:18946:11)
at flushSyncCallbacks (chunk-QXLG2TGQ.js:9164:30)
Minimal Reproducible Example
Here's a minimal reproducible example using CodeSandbox: [Link to your CodeSandbox example]
(If you don't have a CodeSandbox link, you can paste a minimal code example here, like the one I provided in the previous response)
I'm encountering a
TypeError: Cannot read properties of null (reading 'getBoundingClientRect')
error when using theColor
component in my React application. This error occurs specifically when I try to select a color using the color picker. The application crashes, and the error message points to theleva.js
file.Steps to Reproduce
leva
into a React application.useControls
hook to create aColor
input.Expected Behavior
The color picker should allow me to select a color without any errors, and the selected color should be reflected in the application state.
Actual Behavior
The application crashes with the following error message:
Minimal Reproducible Example
Here's a minimal reproducible example using CodeSandbox: [Link to your CodeSandbox example]
(If you don't have a CodeSandbox link, you can paste a minimal code example here, like the one I provided in the previous response)
Environment
Additional Context
leva
components seem to work fine.LevaPanel
, but the error still persists.Number
input as a workaround, which works, but I'd prefer to use theColor
component.Workaround (Optional)
Currently, I'm using a
Number
input to handle colors in HEX format as a workaround:Request
Could you please investigate this issue? Any help or guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: