mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 13:53:59 +00:00
SYNC: fixed translating app object list
This commit is contained in:
committed by
Diflow
parent
43fd7b6000
commit
f642c7570e
@@ -38,19 +38,20 @@
|
|||||||
|
|
||||||
$: matcher = module.createMatcher && module.createMatcher(filter, passProps?.searchSettings);
|
$: matcher = module.createMatcher && module.createMatcher(filter, passProps?.searchSettings);
|
||||||
|
|
||||||
$: dataLabeled = _.compact(
|
$: listTranslated = (list || []).map(data => ({
|
||||||
(list || []).map(data => {
|
...data,
|
||||||
const dataCopy = {...data,
|
group: data?.group && _.isFunction(data.group) ? data.group() : data.group,
|
||||||
group: (data?.group && _.isFunction(data.group)) ? data.group() : data.group,
|
title: data?.title && _.isFunction(data.title) ? data.title() : data.title,
|
||||||
title: (data?.title && _.isFunction(data.title)) ? data.title() : data.title,
|
description: data?.description && _.isFunction(data.description) ? data.description() : data.description,
|
||||||
description: (data?.description && _.isFunction(data.description)) ? data.description() : data.description,
|
|
||||||
args: (data?.args || []).map(x => ({
|
args: (data?.args || []).map(x => ({
|
||||||
...x,
|
...x,
|
||||||
label: (x?.label && _.isFunction(x.label)) ? x.label() : x.label,
|
label: x?.label && _.isFunction(x.label) ? x.label() : x.label,
|
||||||
}))
|
})),
|
||||||
};
|
}));
|
||||||
|
|
||||||
const matchResult = matcher ? matcher(dataCopy) : true;
|
$: dataLabeled = _.compact(
|
||||||
|
(listTranslated || []).map(data => {
|
||||||
|
const matchResult = matcher ? matcher(data) : true;
|
||||||
|
|
||||||
let isMatched = true;
|
let isMatched = true;
|
||||||
let isMainMatched = true;
|
let isMainMatched = true;
|
||||||
@@ -72,8 +73,8 @@
|
|||||||
isChildMatched = !module.disableShowChildrenWithParentMatch;
|
isChildMatched = !module.disableShowChildrenWithParentMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
const group = groupFunc ? groupFunc(dataCopy) : undefined;
|
const group = groupFunc ? groupFunc(data) : undefined;
|
||||||
return { group, data: dataCopy, isMatched, isChildMatched, isMainMatched };
|
return { group, data, isMatched, isChildMatched, isMainMatched };
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -112,7 +113,8 @@
|
|||||||
|
|
||||||
$: groups = groupFunc ? extendGroups(_.groupBy(dataLabeled, 'group'), emptyGroupNames) : null;
|
$: groups = groupFunc ? extendGroups(_.groupBy(dataLabeled, 'group'), emptyGroupNames) : null;
|
||||||
|
|
||||||
$: listLimited = isExpandedBySearch && !expandLimited ? filtered.slice(0, filter.trim().length < 3 ? 1 : 3) : list;
|
$: listLimited =
|
||||||
|
isExpandedBySearch && !expandLimited ? filtered.slice(0, filter.trim().length < 3 ? 1 : 3) : listTranslated;
|
||||||
$: isListLimited = isExpandedBySearch && listLimited.length < filtered.length;
|
$: isListLimited = isExpandedBySearch && listLimited.length < filtered.length;
|
||||||
$: listMissingItems = isListLimited ? filtered.slice(listLimited.length) : [];
|
$: listMissingItems = isListLimited ? filtered.slice(listLimited.length) : [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user