-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add ListboxInput component for selecting multiple options and use it for barbuddies #562
base: main
Are you sure you want to change the base?
Conversation
Deploying outsite-nl with Cloudflare Pages
|
@@ -12,19 +12,23 @@ const props = defineProps({ | |||
barBuddies: { type: Array, required: true }, | |||
}) | |||
|
|||
const form = useReMemberForm('barbuddy', { | |||
const form = useReMemberForm('barbuddy2', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, I forgot, why can't we use the old form still?
Since we're just comma seperating the bar buddies I think we could just as well stick them into the original barbuddy
property
remarks: '', | ||
}) | ||
|
||
const formElement = ref(null) | ||
const submit = async () => { | ||
if (form.fields.buddies.length > 0) { | ||
form.fields.buddy_preferences = form.fields.buddies.join(', ') | ||
} | ||
await form.submit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await form.submit() | |
await form.submit({ | |
buddy_preferences: form.fields.buddies.join(', ') || 'no_preference' | |
}) |
I'd do something like this and remove the previous 3 lines + the property on line 22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, still surprised this works, awesome
ListboxLabel, | ||
ListboxButton, | ||
ListboxOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and the ref import as well)
No description provided.