@trudb/tru-common-lib 0.2.343 → 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.
|
@@ -8150,19 +8150,19 @@ class TruDataGrid {
|
|
|
8150
8150
|
};
|
|
8151
8151
|
onCellMouseOver(e) {
|
|
8152
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;
|
|
8153
8160
|
if (targetElement &&
|
|
8154
8161
|
!targetElement.classList.contains('ag-cell-popup-editing') &&
|
|
8155
|
-
|
|
8162
|
+
entityToValidate.entityAspect.hasValidationErrors) {
|
|
8156
8163
|
if (!targetElement.classList.contains('ag-cell'))
|
|
8157
8164
|
targetElement = targetElement.closest('.ag-cell');
|
|
8158
8165
|
if (targetElement && targetElement.classList.contains('invalid')) {
|
|
8159
|
-
let fieldName = e.colDef.field;
|
|
8160
|
-
let propertyConfig = e.data[fieldName];
|
|
8161
|
-
let propertyPathParts = [];
|
|
8162
|
-
if (propertyConfig.propertyPath.includes('.')) {
|
|
8163
|
-
propertyPathParts = this.getPropertyPathParts(propertyConfig.propertyPath);
|
|
8164
|
-
}
|
|
8165
|
-
let entityToValidate = propertyPathParts.length ? propertyPathParts.reduce((p, c) => p && p[c] || null, e.data.$entity) : e.data.$entity;
|
|
8166
8166
|
let validationErrorsForProperty = this.dataContext.getValidationErrorsForProperty(entityToValidate, propertyConfig.propertyName);
|
|
8167
8167
|
let validationErrorsMessagesForProperty = this.dataContext.parseErrorMessages(validationErrorsForProperty);
|
|
8168
8168
|
let validationDialogConfig = new TruGridValidationDialogConfig(entityToValidate, propertyConfig, false);
|