#null exception with (all) input components

3 messages Β· Page 1 of 1 (latest)

agile ocean
#

Hi guys, im encountering this error today for the first time: when writing inside an input (i'll take a TextInput as example), the error "Uncaught TypeError: Cannot read properties of null (reading 'value')" is triggered.
The relevant parts of code are the ones in the image.
The debug prints in dev console are the following:

[ DEBUG ]
Profile.jsx:362 target: <input class=​"m_8fb7ebe7 mantine-Input-input mantine-TextInput-input" data-variant=​"default" aria-invalid=​"false" id=​"mantine-eamn3au42" value>​
Profile.jsx:363 currentTarget: <input class=​"m_8fb7ebe7 mantine-Input-input mantine-TextInput-input" data-variant=​"default" aria-invalid=​"false" id=​"mantine-eamn3au42" value>​
Profile.jsx:364 target.value: a
Profile.jsx:365 currentTarget.value: a
[ ERRORS ]
installHook.js:1 Global error: TypeError: Cannot read properties of null (reading 'value')
Profile.jsx:368 Global error: TypeError: Cannot read properties of null (reading 'value')

Please help me, i've tried literally everything but i can't figure it out...
Thx in advance!

[NOTE: if im using e.target.value instead of currentTarget, it works good. But i would like to understand why it is not working with currentTarget if the prints indicate that it's the same input component...

agile ocean
#

Does anyone have any idea where the problem might be?

buoyant yacht
# agile ocean Does anyone have any idea where the problem might be?

To get help, isolate the issue, make sure that it include only relevant data. Then reproduce the issue on codesandbox and share the link here.

Codesandbox template – https://codesandbox.io/s/mantine-react-template-q4dd5d?file=/src/App.js

mantine-react-template by rtivital using @emotion/react, @mantine/carousel, @mantine/charts, @mantine/core, @mantine/dates, @mantine/dropzone, @mantine/form, @mantine/hooks, @mantine/modals