@trudb/tru-common-lib 0.2.342 → 0.2.344
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.
|
@@ -7837,6 +7837,7 @@ class TruDataGrid {
|
|
|
7837
7837
|
if (rowNodesToRemove.length) {
|
|
7838
7838
|
this.api.applyTransaction({ remove: rowNodesToRemove });
|
|
7839
7839
|
}
|
|
7840
|
+
this.api.refreshCells({ force: true });
|
|
7840
7841
|
}));
|
|
7841
7842
|
this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
|
|
7842
7843
|
if (this.config.view.active && this.config.view.window.active) {
|
|
@@ -8149,19 +8150,19 @@ class TruDataGrid {
|
|
|
8149
8150
|
};
|
|
8150
8151
|
onCellMouseOver(e) {
|
|
8151
8152
|
let targetElement = e.event.target;
|
|
8153
|
+
let fieldName = e.colDef.field;
|
|
8154
|
+
let propertyConfig = e.data[fieldName];
|
|
8155
|
+
let propertyPathParts = [];
|
|
8156
|
+
if (propertyConfig.propertyPath.includes('.')) {
|
|
8157
|
+
propertyPathParts = this.getPropertyPathParts(propertyConfig.propertyPath);
|
|
8158
|
+
}
|
|
8159
|
+
let entityToValidate = propertyPathParts.length ? propertyPathParts.reduce((p, c) => p && p[c] || null, e.data.$entity) : e.data.$entity;
|
|
8152
8160
|
if (targetElement &&
|
|
8153
8161
|
!targetElement.classList.contains('ag-cell-popup-editing') &&
|
|
8154
|
-
|
|
8162
|
+
entityToValidate.entityAspect.hasValidationErrors) {
|
|
8155
8163
|
if (!targetElement.classList.contains('ag-cell'))
|
|
8156
8164
|
targetElement = targetElement.closest('.ag-cell');
|
|
8157
8165
|
if (targetElement && targetElement.classList.contains('invalid')) {
|
|
8158
|
-
let fieldName = e.colDef.field;
|
|
8159
|
-
let propertyConfig = e.data[fieldName];
|
|
8160
|
-
let propertyPathParts = [];
|
|
8161
|
-
if (propertyConfig.propertyPath.includes('.')) {
|
|
8162
|
-
propertyPathParts = this.getPropertyPathParts(propertyConfig.propertyPath);
|
|
8163
|
-
}
|
|
8164
|
-
let entityToValidate = propertyPathParts.length ? propertyPathParts.reduce((p, c) => p && p[c] || null, e.data.$entity) : e.data.$entity;
|
|
8165
8166
|
let validationErrorsForProperty = this.dataContext.getValidationErrorsForProperty(entityToValidate, propertyConfig.propertyName);
|
|
8166
8167
|
let validationErrorsMessagesForProperty = this.dataContext.parseErrorMessages(validationErrorsForProperty);
|
|
8167
8168
|
let validationDialogConfig = new TruGridValidationDialogConfig(entityToValidate, propertyConfig, false);
|