fix: reload Link on filters change
This commit is contained in:
parent
5feaddcd6f
commit
19c69d1495
@ -127,6 +127,14 @@ watchDebounced(
|
||||
{ debounce: 300, immediate: true },
|
||||
)
|
||||
|
||||
watchDebounced(
|
||||
() => props.filters,
|
||||
() => {
|
||||
reload('', true)
|
||||
},
|
||||
{ debounce: 300, immediate: true },
|
||||
)
|
||||
|
||||
const options = createResource({
|
||||
url: 'frappe.desk.search.search_link',
|
||||
cache: [props.doctype, text.value, props.hideMe, props.filters],
|
||||
@ -154,13 +162,14 @@ const options = createResource({
|
||||
},
|
||||
})
|
||||
|
||||
function reload(val) {
|
||||
function reload(val, force=false) {
|
||||
if (!props.doctype) return
|
||||
if (
|
||||
!force &&
|
||||
options.data?.length &&
|
||||
val === options.params?.txt &&
|
||||
props.doctype === options.params?.doctype
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
options.update({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user