Skip to content

Fully controlled form components behave as stateful #1093

@FezVrasta

Description

@FezVrasta

Raycast version:

Description

Controlled form components don't act as fully controlled. They act as hybrid.

Steps To Reproduce

  1. Create a Form.TextField and add a value and onChange properties
  2. Make sure the onChange handler doesn't update the value
  3. Type into the text field
const [value, setValue] = useState("Hello, World!"); const noop = console.log; return <Form.TextField value={value} onChange={noop} /> 

The current behavior

You can see the text field update with your typed text

The expected behavior

Since the value property is not being updated as I type I don't expect the text field content to update. This behavior should be limited only to text fields using the "defaultValue" property.

Metadata

Metadata

Assignees

Labels

apiIssues related to APIbugSomething isn't workingstatus: fixed in next releaseThe issue will be closed once next release is available

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions