@olaf You are almost there. I suggest that you use the v-model pattern for what you want to accomplish
<treats-named-editor :value=selectedTreat v-model=selectedTreat />
In your component do this
<template>
<q-card-section class="q-gutter-sm">
<div class="text-h6">Object in props</div>
<q-input outlined :value="local.name" @input="$emit('input', local)" label="Name"/>
<q-input outlined :value="local.calories" @input="$emit('input', local)" label="Calories"
/>
</q-card-section>
</template>
<script>
export default {
props: {
treat: Object
},
created () {
this.local = this.treat // we can't change **treat** so we assign it to a new variable
},
data () {
return {
local: null
}
}
}
</script>