@trudb/tru-common-lib 0.2.543 → 0.2.544
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.
|
@@ -6877,9 +6877,7 @@ class TruDataGridCellRenderer {
|
|
|
6877
6877
|
};
|
|
6878
6878
|
init(params) {
|
|
6879
6879
|
params.eGridCell.innerHTML = '';
|
|
6880
|
-
|
|
6881
|
-
if (params.value === null)
|
|
6882
|
-
value = '';
|
|
6880
|
+
const value = params.value ?? '';
|
|
6883
6881
|
if (params.colDef.cellEditor && params.colDef.cellEditor.name === "StdRichTextList") {
|
|
6884
6882
|
var p = document.createElement('div');
|
|
6885
6883
|
p.innerHTML = value;
|
|
@@ -9238,17 +9236,24 @@ class TruDataGrid {
|
|
|
9238
9236
|
}
|
|
9239
9237
|
};
|
|
9240
9238
|
onCellMouseOver(e) {
|
|
9241
|
-
let targetElement = e
|
|
9242
|
-
|
|
9243
|
-
|
|
9239
|
+
let targetElement = e?.event?.target;
|
|
9240
|
+
const fieldName = e?.colDef?.field;
|
|
9241
|
+
const rowData = e?.data;
|
|
9242
|
+
const propertyConfig = fieldName ? rowData?.[fieldName] : undefined;
|
|
9244
9243
|
let propertyPathParts = [];
|
|
9245
|
-
if (propertyConfig?.propertyPath.includes('.')) {
|
|
9244
|
+
if (typeof propertyConfig?.propertyPath === 'string' && propertyConfig.propertyPath.includes('.')) {
|
|
9246
9245
|
propertyPathParts = this.getPropertyPathParts(propertyConfig.propertyPath);
|
|
9247
9246
|
}
|
|
9248
|
-
let entityToValidate =
|
|
9249
|
-
|
|
9247
|
+
let entityToValidate = rowData?.$entity ?? null;
|
|
9248
|
+
for (const propertyPathPart of propertyPathParts) {
|
|
9249
|
+
entityToValidate = entityToValidate?.[propertyPathPart] ?? null;
|
|
9250
|
+
if (entityToValidate === null)
|
|
9251
|
+
break;
|
|
9252
|
+
}
|
|
9253
|
+
if (targetElement?.classList &&
|
|
9254
|
+
propertyConfig?.propertyName &&
|
|
9250
9255
|
!targetElement.classList.contains('ag-cell-popup-editing') &&
|
|
9251
|
-
entityToValidate
|
|
9256
|
+
entityToValidate?.entityAspect?.hasValidationErrors === true) {
|
|
9252
9257
|
if (!targetElement.classList.contains('ag-cell'))
|
|
9253
9258
|
targetElement = targetElement.closest('.ag-cell');
|
|
9254
9259
|
if (targetElement && targetElement.classList.contains('invalid')) {
|