primefaces / primefaces/primereact
TreeSelect does not include its value in form formData
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
The TreeSelect component's selected value is not being included in the form's formData when the form is submitted. This prevents its value from being retrieved with formData.get('name'), making it unusable for standard form submissions.
Reproducer
https://stackblitz.com/edit/vitejs-vite-b2hhqpew?file=src%2FApp.tsx
- Select an item from the TreeSelect component.
- Click the "Submit" button.
System Information
Environment
primereact: 10.9.7
react: 19.1.1
Expected Behavior
When the form is submitted, the TreeSelect component should contribute its value to the form's formData object. The formData.get('name') method should return the value of the selected node.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the StackBlitz reproducer's src/App.tsx and run the form submission after selecting a TreeSelect item. Trace the TreeSelect form submission path to determine why formData.get('name') lacks the selected value. Done means the selected node value is included in the form's formData and can be retrieved with formData.get('name').
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100