1
0
forked from test/crm

revert: removed storage cache from link field

This commit is contained in:
Shariq Ansari 2023-11-13 22:32:35 +05:30
parent aa9eafdc5e
commit 318a497886

View File

@ -34,7 +34,7 @@
import { call } from 'frappe-ui' import { call } from 'frappe-ui'
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue' import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
import { useAttrs, computed, ref } from 'vue' import { useAttrs, computed, ref } from 'vue'
import { computedAsync, watchDebounced, useStorage } from '@vueuse/core' import { computedAsync, watchDebounced } from '@vueuse/core'
const props = defineProps({ const props = defineProps({
doctype: { doctype: {
@ -69,12 +69,6 @@ watchDebounced(
) )
const options = computedAsync(async () => { const options = computedAsync(async () => {
let cachedOptions = localStorage.getItem(props.doctype + '-' + text.value)
if (cachedOptions) {
return JSON.parse(cachedOptions)
}
let options = await call('frappe.desk.search.search_link', { let options = await call('frappe.desk.search.search_link', {
txt: text.value, txt: text.value,
doctype: props.doctype, doctype: props.doctype,
@ -85,9 +79,6 @@ const options = computedAsync(async () => {
value: option.value, value: option.value,
} }
}) })
useStorage(props.doctype + '-' + text.value, options)
return options return options
}) })