Skip to content

fix(button,iconbutton): only submit the clicked button's name and value - #6117

Open
SAY-5 wants to merge 1 commit into
material-components:mainfrom
SAY-5:fix-button-form-value
Open

SAY-5 wants to merge 1 commit into
material-components:mainfrom
SAY-5:fix-button-form-value

Conversation

@SAY-5

@SAY-5 SAY-5 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #6030

Since 082faad moved buttons onto the form-associated mixin, every md button with a value attribute reports it through the default [getFormValue](), so all buttons in a form get submitted instead of only the one that was clicked. Form submitters now return null there and still set their value on click right before requestSubmit().

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@asyncliz asyncliz changed the title fix(button/iconbutton): only submit the clicked button's name and value fix(button,iconbutton): only submit the clicked button's name and value Nov 13, 2026
@asyncliz
asyncliz self-requested a review November 13, 2026 21:56

@asyncliz asyncliz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix!

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Form-associated buttons no longer submit correctly

2 participants