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

fix(components): [collapse] fix triggering form action when inside it #14308

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

Karolis-Stoncius
Copy link
Contributor

@Karolis-Stoncius Karolis-Stoncius commented Sep 16, 2023

When el-collapse with el-collapse-item is placed inside a form and the collapse trigger btn is pressed, form's action as triggered. This fixes it

closed #14304

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at 211e315

Added type attribute to el-button in collapse-item component to prevent form submission. This fixes a bug reported in issue #14304.

Related Issue

Fixes #14304.

Explanation of Changes

🤖 Generated by Copilot at 211e315

  • Add type attribute to el-button component to prevent form submission on click (link)

When el-collapse with el-collapse-item is placed inside a form and the collapse trigger btn is
pressed, form's action as triggered. This fixes it

closed element-plus#14304
@pull-request-triage
Copy link

👋 @Karolis-Stoncius, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

Hello @Karolis-Stoncius, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Sep 16, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Sep 16, 2023
@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14308
Please comment the example via this playground if needed.

@btea btea requested a review from tolking September 16, 2023 13:04
@tolking tolking merged commit 02905e4 into element-plus:dev Sep 17, 2023
13 checks passed
@KarolMilewski
Copy link

@ryuhangyeong when release with this fix?

@ryuhangyeong
Copy link
Member

It is expected to be released within two weeks, but this is not exact.

@Karolis-Stoncius

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.

[Component] [collapse-item] el-collapse-item in el-form is broken - clicking on its header triggers form post
5 participants