mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
ingredient editor improvements
This commit is contained in:
@@ -75,7 +75,7 @@ function mergeModel() {
|
||||
|
||||
genericModel.merge(props.source, target.value).then(r => {
|
||||
useMessageStore().addPreparedMessage(PreparedMessage.UPDATE_SUCCESS)
|
||||
emit('change')
|
||||
emit('change', target.value)
|
||||
|
||||
if (automate.value && target.value != null && Object.hasOwn(props.source, 'name') && Object.hasOwn(target.value, 'name')) {
|
||||
let automation = {
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<!-- TODO label is not showing for some reason, for now in placeholder -->
|
||||
<!-- TODO support density prop -->
|
||||
<v-input :hint="props.hint" persistent-hint :label="props.label" >
|
||||
<v-input :hint="props.hint" persistent-hint :label="props.label">
|
||||
<template #prepend>
|
||||
<slot name="prepend">
|
||||
|
||||
</slot>
|
||||
</template>
|
||||
<!-- TODO resolve-on-load false for now, race condition with model class, make prop once better solution is found -->
|
||||
<Multiselect
|
||||
|
||||
@@ -37,6 +41,11 @@
|
||||
}"
|
||||
/>
|
||||
|
||||
<template #append>
|
||||
<slot name="append">
|
||||
|
||||
</slot>
|
||||
</template>
|
||||
</v-input>
|
||||
</template>
|
||||
|
||||
@@ -72,7 +81,7 @@ const props = defineProps({
|
||||
|
||||
label: {type: String, default: ''},
|
||||
hint: {type: String, default: ''},
|
||||
density: {type: String as PropType<''|'compact'|'comfortable'>, default: ''},
|
||||
density: {type: String as PropType<'' | 'compact' | 'comfortable'>, default: ''},
|
||||
|
||||
searchOnLoad: {type: Boolean, default: false},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user