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

Forward disabled state to hidden inputs in form-like components #3004

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

RobinMalfait
Copy link
Member

This PR fixes an issue where form-like components are disabled then the hidden input fields should be disabled as well otherwise they will be submitted to the form.

We will now forward the disabled state to the hidden inputs.

Fixes: #2988

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 1:14pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 1:14pm

@RobinMalfait RobinMalfait changed the title Ensure hidden input fields are disabled main component is disabled Ensure hidden input fields are disabled, when the main component is disabled Feb 21, 2024
@RobinMalfait RobinMalfait changed the title Ensure hidden input fields are disabled, when the main component is disabled Forward disabled state to hidden inputs in form-like components Feb 21, 2024
@RobinMalfait RobinMalfait merged commit a50be92 into main Feb 21, 2024
8 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-2988 branch February 21, 2024 13:16
RobinMalfait added a commit that referenced this pull request Apr 15, 2024
)

* make hidden inputs disabled if the wrapping component is disabled

* add tests to verify disabled hidden form elements

* update changelog
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

Successfully merging this pull request may close these issues.

Combobox disabled attribute not disabling hidden inputs
1 participant