refactor(components): update band selector
allow for custom label to be passed to the form item
This commit is contained in:
parent
3afcd2b602
commit
26c0352504
@ -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="
|
||||
|
Loading…
x
Reference in New Issue
Block a user