Skip to content

Documentation of "useTextField" from React-Aria is not up to date #5838

@MaxAuMax

Description

@MaxAuMax

Provide a general summary of the issue here

[Sorry for english mistakes, i'm french]

I am currently doing React components using React-Aria. I was doing a TextField with the useTextField hook but it seems that his documentation is not up to date ! In the code example, "isInvalid" and "validationErrors" are two props that can be used but appears to not exist anymore !

🤔 Expected Behavior?

I should be able to get those props to handle the error cases when a query is sent.
If i'm just doing something wrong, please let me know.
image

😯 Current Behavior

I am getting two errors, the same, for "isInvalid" and "validationErrors"

Property 'isInvalid' does not exist on type 'TextFieldAria<"input">'.

Property 'validationErrors' does not exist on type 'TextFieldAria<"input">'

image

💁 Possible Solution

Update the documentation 😅

🔦 Context

No specific context.

🖥️ Steps to Reproduce

  • Install react aria
  • Create a file.tsx
  • Paste the example code from the documentation
  • ERROR 🟥

Version

react-aria: ^3.28.0

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Other

If other, please specify.

No response

What operating system are you using?

Linux, Xubuntu

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions