adobe / adobe/react-spectrum

Controlled input validation is not updated after an external change

Open
#8,659 7 comments 2 reactions 0 assignees View on GitHub
bug needs investigation
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the issue here

if an external action changes the value from an invalid controlled input, the validation message doesn't change

### 🤔 Expected Behavior?

validation should be updated in the same way as it's updated when I type in the input

### 😯 Current Behavior

validation is not updated from external actions

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/musing-sara-w75p44?file=%2Fsrc%2FApp.js%3A18%2C30

- submit empty form
- see validation message
- click 'set to XXX'
- message is still there, but form submission works

refresh the page

- submit empty form
- see validation form
- update the input manually (type 15)
- validation message is gone <-- this is the behaviour I want to replicate

### Version

latest

### What browsers are you seeing the problem on?

Microsoft Edge

### If other, please specify.

_No response_

### What operating system are you using?

mac

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.