If the filter has changed, re-fetch (#12625)
* If the filter has changed, re-fetch * lint * Clear value when filter changes
This commit is contained in:
parent
36c03ad2a7
commit
165eb206d9
|
@ -108,8 +108,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: forceFetchRows(filter)
|
||||||
$: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
$: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
||||||
|
|
||||||
|
const forceFetchRows = async () => {
|
||||||
|
// if the filter has changed, then we need to reset the options, clear the selection, and re-fetch
|
||||||
|
optionsObj = {}
|
||||||
|
fieldApi.setValue([])
|
||||||
|
selectedValue = []
|
||||||
|
debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
||||||
|
}
|
||||||
const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => {
|
const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => {
|
||||||
const allRowsFetched =
|
const allRowsFetched =
|
||||||
$fetch.loaded &&
|
$fetch.loaded &&
|
||||||
|
|
Loading…
Reference in New Issue