Skip to content

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

@vercel
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
@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

2 participants