Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextField doesn't provide TextFieldStateContext #7565

Open
vixalien opened this issue Jan 5, 2025 · 2 comments
Open

TextField doesn't provide TextFieldStateContext #7565

vixalien opened this issue Jan 5, 2025 · 2 comments

Comments

@vixalien
Copy link

vixalien commented Jan 5, 2025

Provide a general summary of the issue here

I believe TextFieldStateContext should be provided, so that we can reset the field's context when clicking a clear button.

🤔 Expected Behavior?

The TextFieldStateContext to be provided.

😯 Current Behavior

No such context exists

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

Install the package, try to import TextFieldStateContext

Version

react-aria-components 1.5.0

What browsers are you seeing the problem on?

Firefox

If other, please specify.

No response

What operating system are you using?

alpine linux edge

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@LFDanLu
Copy link
Member

LFDanLu commented Jan 8, 2025

Could you instead make the textfield controlled and reset the value on button click that way?

@AleksandrRogov
Copy link

There is another problem with not having a context for the text field, is that there is no way to access the validation functions. Such as commitValidation() or properties such as displayValidation.
But I feel like there must be a reason why some components have state contexts and some not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants