mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-21 22:13:31 -07:00
feat(ui): allow adding a new category in cookbook management dropdown
This commit is contained in:
parent
117c6b9948
commit
d330c0b425
2 changed files with 9 additions and 3 deletions
|
@ -186,7 +186,7 @@
|
|||
v-else-if="field.type === Organizer.Category"
|
||||
v-model="field.organizers"
|
||||
:selector-type="Organizer.Category"
|
||||
:show-add="false"
|
||||
:show-add="true"
|
||||
:show-label="false"
|
||||
:show-icon="false"
|
||||
variant="underlined"
|
||||
|
|
|
@ -11,12 +11,10 @@
|
|||
multiple
|
||||
:variant="variant"
|
||||
:prepend-inner-icon="icon"
|
||||
:append-icon="showAdd ? $globals.icons.create : undefined"
|
||||
return-object
|
||||
auto-select-first
|
||||
class="pa-0"
|
||||
@update:model-value="resetSearchInput"
|
||||
@click:append="dialog = true"
|
||||
>
|
||||
<template #chip="{ item, index }">
|
||||
<v-chip
|
||||
|
@ -32,6 +30,14 @@
|
|||
{{ item.value }}
|
||||
</v-chip>
|
||||
</template>
|
||||
<template v-if="showAdd" #append-item>
|
||||
<v-divider class="my-2" />
|
||||
<v-list-item
|
||||
:title="`+ ${$t('general.add')}`"
|
||||
class="text-primary"
|
||||
@click="dialog = true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template
|
||||
v-if="showAdd"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue