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

Cannot use it within the <form> #6

Closed
smiile8888 opened this issue Jun 7, 2021 · 2 comments
Closed

Cannot use it within the <form> #6

smiile8888 opened this issue Jun 7, 2021 · 2 comments

Comments

@smiile8888
Copy link

smiile8888 commented Jun 7, 2021

Problem:
I wanted to use it in the <form> but the accordion using the <button> and it becomes type="submit" automatically when using with <form>

Expected:
Can use as a normal accordion even it's used in the <form>, maybe type="button" could be added to the AccordionItem component

I'm not sure is there a way or any prop I can pass to prevent it?
Thank you!

metonym added a commit that referenced this issue Jun 7, 2021
* chore(example): upgrade deps

* fix(accordion-item): use onMount instead of onDestroy

* fix(accordion-item): add type="button" to button #6

* docs: document disabled state, reactivity

* chore(deps-dev): upgrade svelte-check

* test: test more props
@metonym
Copy link
Owner

metonym commented Jun 7, 2021

@smiile8888 Thank you for raising this issue. type="button" has been added to the AccordionItem button to prevent the default behavior when using the component inside a form element.

Published to npm in version 1.0.2

@smiile8888
Copy link
Author

@metonym Thank you very much for addressing the issue 😄

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

No branches or pull requests

2 participants