Open rhufsky opened 4 days ago
@wingkwong , I would like to work on this issue. Could you please provide a video explaining the exact bug and the location of the component so that I can understand it better?
The source code is here: https://github.com/rhufsky/nextui-demo.
The relevant code is in src/components/TextAreaDemoForm.tsx
Start the app:
Enter data
Hit "Submit", input data in NextUI Textarea disappears and is replaced by default value.
Hover over Textarea NextUI, input data reappears
NextUI Version
2.4.8 and 2.5-beta.8 and "@nextui-org/input": "^2.3.0-beta.6", "@nextui-org/system": "^2.3.0-beta.4", "@nextui-org/theme": "^2.3.0-beta.6"
Describe the bug
Textarea seems to temporarily lose its content on form submit with a NextJS server side action that does not refresh the page. I have a Textarea that is used as a controlled component.
Submit is handled by a form action, which is cliend side for sake of brevity.
I use NextJS15 / React 19 RC. I tried NextUI 2.4.8 and NextUI 2.5 beta.
Your Example Website or App
https://github.com/rhufsky/nextui-demo
Steps to Reproduce the Bug or Issue
Expected behavior
The textarea should keep its value even after a submit, given the value comes from the state and all other components display the state as well.
The goal is to do verification in a server action. In case of a verification error, the form fields contents should be as entered by the user.
Screenshots or Videos
No response
Operating System Version
MacOS, bun
Browser
Chrome