adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.53k stars 1.08k forks source link

RAC ComboBox logs console warnings when used in a form #6651

Closed joshuajaco closed 2 months ago

joshuajaco commented 2 months ago

Provide a general summary of the issue here

When passing a name to a react-aria-components ComboBox we get the following warning messages in the console:

on render ``` Warning: `value` prop on `input` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components. ``` image
on change ``` Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components ``` image

๐Ÿค” Expected Behavior?

It does not show a warning

๐Ÿ˜ฏ Current Behavior

It shows a warning

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

visit the codesandbox and open the console

Version

react-aria-components@1.2.1

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

If other, please specify.

No response

What operating system are you using?

MacOS

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

snowystinger commented 2 months ago

Should be fixed by https://github.com/adobe/react-spectrum/pull/6336 when we do our next release.