Skip to content

Commit

Permalink
[SelectList] Add type="button" to <button> wrapper to not submit …
Browse files Browse the repository at this point in the history
…forms on click
  • Loading branch information
techniq committed Jan 11, 2024
1 parent 77c96ad commit a7b7a4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-papayas-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-ux": patch
---

[SelectList] Add `type="button"` to `<button>` wrapper to not submit forms on click
1 change: 1 addition & 0 deletions packages/svelte-ux/src/lib/components/SelectField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@

<!-- svelte-ignore a11y-click-events-have-key-events -->
<button
type="button"
aria-haspopup={!inlineOptions ? "listbox" : undefined}
class={cls("SelectField block w-full cursor-default text-left", theme.root, classes.root, $$props.class)}
on:click={onClick}>
Expand Down

0 comments on commit a7b7a4e

Please sign in to comment.