@wavemaker/app-ng-runtime 11.8.1-next.27335 → 11.8.1-next.27336
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.
app-ng-runtime/package.json
CHANGED
|
@@ -2835,6 +2835,9 @@ $.widget('wm.datatable', {
|
|
|
2835
2835
|
collapseRow: function(rowId) {
|
|
2836
2836
|
this.toggleExpandRow(rowId, false)
|
|
2837
2837
|
},
|
|
2838
|
+
hasAllClasses: function (element, classNames) { // function to check if all the class names are present in the element
|
|
2839
|
+
return classNames && classNames.every(cls => element.hasClass(cls));
|
|
2840
|
+
},
|
|
2838
2841
|
_collapseRow: function(e, rowData, rowId, $nextDetailRow, $icon) {
|
|
2839
2842
|
var self = this,
|
|
2840
2843
|
$tbody = self.gridElement,
|
|
@@ -2844,7 +2847,7 @@ $.widget('wm.datatable', {
|
|
|
2844
2847
|
if (this.options.onBeforeRowCollapse(e, rowData, rowId) === false) {
|
|
2845
2848
|
return;
|
|
2846
2849
|
}
|
|
2847
|
-
if ($icon.length && $icon
|
|
2850
|
+
if ($icon.length && this.hasAllClasses($icon, this.options.cssClassNames.rowExpandIcon?.split(' '))) {
|
|
2848
2851
|
$icon.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon);
|
|
2849
2852
|
}
|
|
2850
2853
|
$nextDetailRow.hide();
|
|
@@ -2884,7 +2887,7 @@ $.widget('wm.datatable', {
|
|
|
2884
2887
|
}
|
|
2885
2888
|
self.options.generateRowDetailView(e, rowData, rowId, $nextDetailRow.find('td.app-datagrid-row-details-cell .details-section'),
|
|
2886
2889
|
$nextDetailRow.find('td.app-datagrid-row-details-cell .row-overlay'), function () {
|
|
2887
|
-
if ($icon.length && $icon
|
|
2890
|
+
if ($icon.length && self.hasAllClasses($icon, self.options.cssClassNames.rowCollapseIcon?.split(' '))) {
|
|
2888
2891
|
$icon.removeClass(self.options.cssClassNames.rowCollapseIcon).addClass(self.options.cssClassNames.rowExpandIcon);
|
|
2889
2892
|
}
|
|
2890
2893
|
$nextDetailRow.show();
|