Open pgrabo opened 11 months ago
@pgrabo Your sandbox doesn't repro the issue π€ the input
element seems snapshotted and logged to the console correctly:
mj12albert Yes, it is snapshotted and logged ok, but the issue is actually the error which is logged to the console when doing snapshot:
MUI: Unable to find the input element. It was resolved to null while an HTMLInputElement was expected.
Instead, Autocomplete expects an input element.
Make sure you have customized the input component correctly.
You can see the last line of this error in the screenshot above. Actually you did reproduced the issue. Yes, you are right, snapshot looks ok. But why mui prints this error then ? Mui tells me that I am misusing the input element, that the way I coustomized it is wrong :/
In my test environment any console error causes the test to fail (despite the fact that the snapshot might be ok) That is why this error worries me.
Duplicates
Latest version
Steps to reproduce πΉ
Link to live example: https://codesandbox.io/p/sandbox/reverent-worker-y7dtfw
Steps:
Current behavior π―
Snapshot is created properly. There is following error while creating snapshot: "MUI: Unable to find the input element. It was resolved to null while an HTMLInputElement was expected. Instead, Autocomplete expects an input element.
Make sure you have customized the input component correctly."
Expected behavior π€
Snapshot is created properly. There are no errors while creating snapshot.
Context π¦
I wanted to customize Autocomplete to show the tooltip for the input/TextFileld value whenever the value is too long and ends with ellipsis. I find it usefull for the users to see the full label in the tooltip, in case it is trucated in the input.
Your environment π
``` System: OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish) Binaries: Node: 20.4.0 - ~/.nvm/versions/node/v20.4.0/bin/node Yarn: 1.22.4 - ~/.nvm/versions/node/v20.4.0/bin/yarn npm: 9.7.2 - ~/.nvm/versions/node/v20.4.0/bin/npm Browsers: Chrome: session. ``` Chrome version used: Version 119.0.6045.200 (Official Build) (64-bit)npx @mui/envinfo