fix: return value as string not object

This commit is contained in:
Shariq Ansari 2023-11-13 16:24:36 +05:30
parent 9148163485
commit 929c0e4ee8

View File

@ -16,7 +16,7 @@
<script setup>
import { call } from 'frappe-ui'
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
import { defineModel, useAttrs, computed } from 'vue'
import { useAttrs, computed } from 'vue'
import { computedAsync } from '@vueuse/core'
const props = defineProps({
@ -24,11 +24,21 @@ const props = defineProps({
type: String,
required: true,
},
modelValue: {
type: String,
default: '',
},
})
const value = defineModel()
const emit = defineEmits(['update:modelValue'])
const attrs = useAttrs()
const value = computed({
get: () => props.modelValue,
set: (val) => emit('update:modelValue', val?.value),
})
const options = computedAsync(async () => {
let options = await call('frappe.desk.search.search_link', {
txt: '',