@acorex/cdk 20.10.14 → 20.10.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1880,9 +1880,17 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
|
1880
1880
|
const valueKey = isComplexObject ? get(itemRecord, this.valueField) : item;
|
|
1881
1881
|
const key = valueKey != null ? String(valueKey) : String(item);
|
|
1882
1882
|
const cacheKey = this.createCacheKey(key);
|
|
1883
|
-
// Return cached item if available and has text
|
|
1884
1883
|
const cachedItem = this.dataService.cacheList[cacheKey];
|
|
1885
1884
|
if (cachedItem && get(cachedItem, this.textField) != null) {
|
|
1885
|
+
if (isComplexObject) {
|
|
1886
|
+
const incomingText = get(itemRecord, this.textField);
|
|
1887
|
+
if (incomingText != null &&
|
|
1888
|
+
incomingText !== get(cachedItem, this.textField) &&
|
|
1889
|
+
incomingText !== '@acorex:common.status.loading') {
|
|
1890
|
+
Object.assign(cachedItem, itemRecord);
|
|
1891
|
+
delete cachedItem['_lastDisplayTextResult'];
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1886
1894
|
return cachedItem;
|
|
1887
1895
|
}
|
|
1888
1896
|
const hasTextProperty = !isComplexObject || get(itemRecord, this.textField) != null;
|
|
@@ -2080,6 +2088,20 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
|
2080
2088
|
if (item && typeof item === 'object' && item['_displayTextLoading']) {
|
|
2081
2089
|
return '@acorex:common.status.loading';
|
|
2082
2090
|
}
|
|
2091
|
+
if (item && typeof item === 'object') {
|
|
2092
|
+
const incomingText = get(item, this.textField);
|
|
2093
|
+
if (incomingText != null && incomingText !== '' && incomingText !== '@acorex:common.status.loading') {
|
|
2094
|
+
const itemKey = get(item, this.valueField);
|
|
2095
|
+
if (itemKey != null) {
|
|
2096
|
+
const cachedItem = this.dataService.cacheList[this.createCacheKey(String(itemKey))];
|
|
2097
|
+
if (cachedItem && cachedItem[this.textField] !== incomingText) {
|
|
2098
|
+
cachedItem[this.textField] = incomingText;
|
|
2099
|
+
delete cachedItem['_lastDisplayTextResult'];
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
return String(incomingText);
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2083
2105
|
// Add timestamp-based debouncing to prevent excessive calls for ALL item types
|
|
2084
2106
|
const now = Date.now();
|
|
2085
2107
|
const itemKey = typeof item === 'string' ? item : get(item, this.valueField);
|