Skip to content

setState not triggering Form rerender #936

Closed

Description

@kellyiscute

Raycast version: 1.28.0

Description

When using controlled textField, setState does not update the actual value of the textField, or TextArea. I found out that setState does not update the ui even if I put my state to the title of the textField

Steps To Reproduce

Sample code

The current behavior

setState does not trigger ui rerender.

The expected behavior

setState should trigger ui rerendering.

Activity

  1. added
    api
    bug
    on Feb 18, 2022
  2. mattisssa commented on Feb 18, 2022

    @mattisssa
    Contributor

    Hey @guo40020! Thanks for the report. For some reason, your code works fine for me. Probably I'm doing something wrong to reproduce it, could you please share more details? probably a screencast of the issue will help.

  3. kellyiscute commented on Feb 19, 2022

    @kellyiscute
    Author

    Thanks for reply! Actually the problem that I was running in was that I was trying to limit the Clash port TextField to accept only numbers but I found that the actual state behind it was correct but the value of the TextField was not controlled by the state.

    Screenshot:
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apibug

Type

No type

Fields

Priority

None yet

Severity

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions