fix: personal notes on loading

This commit is contained in:
patak 2023-05-15 09:26:55 +02:00
parent 29f6a73de1
commit f635e0a634

View file

@ -82,6 +82,10 @@ watchEffect(() => {
}) })
const personalNoteDraft = ref(relationship?.note ?? '') const personalNoteDraft = ref(relationship?.note ?? '')
watch($$(relationship), (relationship, oldValue) => {
if (!oldValue && relationship)
personalNoteDraft.value = relationship.note ?? ''
})
async function editNote(event: Event) { async function editNote(event: Event) {
if (!event.target || !('value' in event.target) || !relationship) if (!event.target || !('value' in event.target) || !relationship)