refactor(components): update pairing selector

- add data-testid attr
- change placement of menu popup
- allow selection clearing
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-11-11 18:12:55 -05:00
parent a3fc1d0f9b
commit 3afcd2b602
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -19,7 +19,15 @@
<a-form-item label="Pairings">
<a-row :gutter="5" :wrap="true" v-for="(field, idx) in fields" :key="field.key">
<Field :name="fname + 'relationships' + `[${idx}]`">
<a-select mode="multiple" v-bind="$attrs" :options="opts" v-model:value="field.value as string[]" @change="(val) => update(idx, val as string[])">
<a-select
mode="multiple"
placement="topLeft"
:data-testid="`${$attrs['data-testid']}.${idx}`"
:options="opts"
v-model:value="field.value as string[]"
@change="(val) => update(idx, val as string[])"
:allow-clear="true"
>
<template #removeIcon>
<i class="far fa-circle-x" />
</template>