refactor(components): update band selector

allow for custom label to be passed to the form item
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-11-11 18:15:30 -05:00
parent 3afcd2b602
commit 26c0352504
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -3,7 +3,7 @@
import { RuleExpression, useField } from "vee-validate";
import { cs } from "@client/storyFormSchema";
import { IBand } from "@models/band";
const props = defineProps<{ label: string }>();
const bandlist = inject<IBand[]>("bandlist");
const fname = inject<string>("curName");
const { updateBands, sb } = inject<any>("selectedBands");
@ -22,10 +22,11 @@
</script>
<template>
<a-form-item :validate-status="!!errorMessage ? 'error' : undefined" :help="errorMessage as any" label="Bands">
<a-form-item :validate-status="!!errorMessage ? 'error' : undefined" :help="errorMessage as any" :label="label || 'Bands'">
<a-select
v-bind="$attrs"
:allow-clear="true"
placement="topLeft"
mode="multiple"
option-filter-prop="label"
@change="