perf: apply search
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Javier Segarra 2025-02-24 02:32:50 +01:00
parent 403159629b
commit 43bbf05adf
3 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ async function search(evt) {
store.filter.where = {};
isLoading.value = true;
const filter = { ...userParams.value, ...$props.modelValue };
const filter = { ...userParams.value, ...$props.modelValue, ...evt };
store.userParamsChanged = true;
if (excludeParams.value) {
filter.params = {

View File

@ -126,7 +126,7 @@ async function search() {
arrayData.resetPagination();
let filter = { params: { search: searchText.value } };
if (filterPanel.value) {
if (filterPanel?.value?.filterPanelRef) {
filterPanel.value.filterPanelRef.search(filter);
return;
}

View File

@ -100,8 +100,8 @@ export function useArrayData(key, userOptions) {
params.filter = JSON.stringify(params.filter);
if (fetchOptions?.exclude) {
params = { ...params, ...fetchOptions.exclude };
delete params.exclude;
params = { ...params.params, ...fetchOptions.exclude };
}
store.isLoading = true;
const response = await axios.get(store.url, {
@ -232,7 +232,7 @@ export function useArrayData(key, userOptions) {
if (
params[param] === '' ||
params[param] === null ||
!Object(params[param]).length
!Object.keys(params[param]).length
) {
delete store.userParams[param];
delete params[param];