diff --git a/.changeset/quick-buses-kneel.md b/.changeset/quick-buses-kneel.md new file mode 100644 index 000000000..023fa917a --- /dev/null +++ b/.changeset/quick-buses-kneel.md @@ -0,0 +1,5 @@ +--- +'@churros/app': patch +--- + +don't trigger form submissions when picking an option in a modal picker diff --git a/.changeset/quiet-pans-train.md b/.changeset/quiet-pans-train.md new file mode 100644 index 000000000..c1d80caaf --- /dev/null +++ b/.changeset/quiet-pans-train.md @@ -0,0 +1,5 @@ +--- +'@churros/app': minor +--- + +fix(signup): force opening major picker before anything else (closes #1190) diff --git a/packages/app/src/lib/components/InputMajor.svelte b/packages/app/src/lib/components/InputMajor.svelte index db0c0ce48..259a31e5a 100644 --- a/packages/app/src/lib/components/InputMajor.svelte +++ b/packages/app/src/lib/components/InputMajor.svelte @@ -6,8 +6,11 @@ import LoadingText from '$lib/components/LoadingText.svelte'; import PickMajor from '$lib/components/PickMajor.svelte'; import { loading, type MaybeLoading } from '$lib/loading'; + import { createEventDispatcher } from 'svelte'; import IconChevronRight from '~icons/msl/chevron-right'; + const dispatch = createEventDispatcher<{ open: undefined }>(); + /** Selected major uid */ export let major: string; @@ -96,6 +99,7 @@ { + dispatch('open'); major = ''; }} > @@ -103,7 +107,12 @@ {/if} - + { + open?.(); + dispatch('open'); + }} + > {#if major || clearable}Changer{:else}Choisir{/if} diff --git a/packages/app/src/lib/components/PickThings.svelte b/packages/app/src/lib/components/PickThings.svelte index 66ecaca4b..e986718e4 100644 --- a/packages/app/src/lib/components/PickThings.svelte +++ b/packages/app/src/lib/components/PickThings.svelte @@ -86,6 +86,7 @@ {/if}