@wavemaker/app-ng-runtime 11.4.0-next.141708 → 11.4.0-next.1417080

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.
Files changed (125) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +2 -2
  2. app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +3 -3
  4. app-ng-runtime/build-task/fesm2015/index.js +2 -2
  5. app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
  6. app-ng-runtime/components/base/bundles/index.umd.js +23 -1
  7. app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
  8. app-ng-runtime/components/base/esm2015/public_api.js +2 -2
  9. app-ng-runtime/components/base/esm2015/utils/widget-utils.js +16 -1
  10. app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
  11. app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
  12. app-ng-runtime/components/base/fesm2015/index.js +24 -3
  13. app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
  14. app-ng-runtime/components/base/index.metadata.json +1 -1
  15. app-ng-runtime/components/base/public_api.d.ts +1 -1
  16. app-ng-runtime/components/base/utils/widget-utils.d.ts +7 -0
  17. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +2 -2
  18. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js.map +1 -1
  19. app-ng-runtime/components/basic/rich-text-editor/esm2015/rich-text-editor.component.js +3 -3
  20. app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js +2 -2
  21. app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js.map +1 -1
  22. app-ng-runtime/components/containers/tabs/bundles/index.umd.js +39 -23
  23. app-ng-runtime/components/containers/tabs/bundles/index.umd.js.map +1 -1
  24. app-ng-runtime/components/containers/tabs/esm2015/tab-pane/tab-pane.component.js +8 -1
  25. app-ng-runtime/components/containers/tabs/esm2015/tabs.animator.js +33 -13
  26. app-ng-runtime/components/containers/tabs/fesm2015/index.js +40 -13
  27. app-ng-runtime/components/containers/tabs/fesm2015/index.js.map +1 -1
  28. app-ng-runtime/components/containers/tabs/tabs.animator.d.ts +5 -1
  29. app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
  30. app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
  31. app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
  32. app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
  33. app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
  34. app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
  35. app-ng-runtime/components/data/form/index.metadata.json +1 -1
  36. app-ng-runtime/components/data/list/bundles/index.umd.js +36 -45
  37. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  38. app-ng-runtime/components/data/list/esm2015/list.component.js +34 -43
  39. app-ng-runtime/components/data/list/fesm2015/index.js +33 -42
  40. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  41. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  42. app-ng-runtime/components/data/list/list.component.d.ts +1 -1
  43. app-ng-runtime/components/data/pagination/bundles/index.umd.js +22 -5
  44. app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
  45. app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +23 -6
  46. app-ng-runtime/components/data/pagination/fesm2015/index.js +22 -5
  47. app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
  48. app-ng-runtime/components/data/pagination/index.metadata.json +1 -1
  49. app-ng-runtime/components/data/pagination/pagination.component.d.ts +1 -0
  50. app-ng-runtime/components/data/table/bundles/index.umd.js +59 -13
  51. app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
  52. app-ng-runtime/components/data/table/esm2015/table-filter.directive.js +3 -2
  53. app-ng-runtime/components/data/table/esm2015/table.component.js +56 -13
  54. app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
  55. app-ng-runtime/components/data/table/fesm2015/index.js +59 -13
  56. app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
  57. app-ng-runtime/components/data/table/index.metadata.json +1 -1
  58. app-ng-runtime/components/data/table/table.component.d.ts +9 -0
  59. app-ng-runtime/components/dialogs/default/base-dialog.d.ts +1 -0
  60. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +11 -2
  61. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  62. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +12 -4
  63. app-ng-runtime/components/dialogs/default/fesm2015/index.js +11 -3
  64. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  65. app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
  66. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +5 -0
  67. app-ng-runtime/components/input/epoch/bundles/index.umd.js +59 -12
  68. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  69. app-ng-runtime/components/input/epoch/date-time/date-time-picker.component.d.ts +1 -0
  70. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +32 -3
  71. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -3
  72. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time-picker.component.js +31 -11
  73. app-ng-runtime/components/input/epoch/fesm2015/index.js +62 -14
  74. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  75. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  76. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
  77. app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
  78. app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
  79. app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
  80. app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
  81. app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
  82. app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
  83. app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
  84. app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
  85. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -0
  86. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  87. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +4 -1
  88. app-ng-runtime/components/navigation/popover/fesm2015/index.js +3 -0
  89. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  90. app-ng-runtime/core/bundles/index.umd.js +7 -1
  91. app-ng-runtime/core/bundles/index.umd.js.map +1 -1
  92. app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
  93. app-ng-runtime/core/fesm2015/index.js +7 -1
  94. app-ng-runtime/core/fesm2015/index.js.map +1 -1
  95. app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +24 -6
  96. app-ng-runtime/mobile/components/page/default/bundles/index.umd.js.map +1 -1
  97. app-ng-runtime/mobile/components/page/default/esm2015/page.directive.js +20 -3
  98. app-ng-runtime/mobile/components/page/default/fesm2015/index.js +19 -2
  99. app-ng-runtime/mobile/components/page/default/fesm2015/index.js.map +1 -1
  100. app-ng-runtime/mobile/components/page/default/index.metadata.json +1 -1
  101. app-ng-runtime/mobile/components/page/default/page.directive.d.ts +4 -1
  102. app-ng-runtime/mobile/core/bundles/index.umd.js +2 -1
  103. app-ng-runtime/mobile/core/bundles/index.umd.js.map +1 -1
  104. app-ng-runtime/mobile/core/esm2015/services/device.service.js +3 -2
  105. app-ng-runtime/mobile/core/fesm2015/index.js +2 -1
  106. app-ng-runtime/mobile/core/fesm2015/index.js.map +1 -1
  107. app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js +3 -2
  108. app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js.map +1 -1
  109. app-ng-runtime/mobile/runtime-dynamic/esm2015/services/live-sync.service.js +4 -3
  110. app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js +3 -2
  111. app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js.map +1 -1
  112. app-ng-runtime/package.json +1 -1
  113. app-ng-runtime/runtime/base/bundles/index.umd.js +1 -0
  114. app-ng-runtime/runtime/base/bundles/index.umd.js.map +1 -1
  115. app-ng-runtime/runtime/base/esm2015/services/prefab-manager.service.js +2 -1
  116. app-ng-runtime/runtime/base/fesm2015/index.js +1 -0
  117. app-ng-runtime/runtime/base/fesm2015/index.js.map +1 -1
  118. app-ng-runtime/scripts/datatable/datatable.js +94 -25
  119. app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +3 -3
  120. app-ng-runtime/variables/bundles/index.umd.js +5 -12
  121. app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
  122. app-ng-runtime/variables/esm2015/constants/variables.constants.js +3 -9
  123. app-ng-runtime/variables/fesm2015/index.js +2 -9
  124. app-ng-runtime/variables/fesm2015/index.js.map +1 -1
  125. app-ng-runtime/variables/index.metadata.json +1 -1
@@ -534,14 +534,20 @@ $.widget('wm.datatable', {
534
534
 
535
535
  /* Returns the tbody markup. */
536
536
  _getGridTemplate: function () {
537
- var self = this, preparedData,$tbody, tbodyExists,pageStartIndex = self.getPageStartIndex(),
537
+
538
+ var self = this, preparedData,$tbody,pageStartIndex = self.getPageStartIndex(),
538
539
  startRowIndex = self.options.startRowIndex,
539
540
  isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
540
541
  if(isScrollorOnDemand) {
541
542
  $tbody = this.gridElement;
543
+ if(this.renderTableOnViewLess) {
544
+ $tbody = this.gridElement.empty();
545
+ this.hideLoadingIndicator();
546
+ // this.addNavigationControls();
547
+ this.renderTableOnViewLess = false;
548
+ }
542
549
  } else {
543
- tbodyExists = this.gridElement.find('tbody').length;
544
- $tbody = tbodyExists > 0 ? this.gridElement.find('tbody:first') : this.gridElement.empty();
550
+ $tbody = this.gridElement.empty();
545
551
  }
546
552
 
547
553
  if(isScrollorOnDemand) {
@@ -1102,25 +1108,52 @@ $.widget('wm.datatable', {
1102
1108
  },
1103
1109
 
1104
1110
  /* Inserts a load more button at the end of the table when the pagination selected is on demand */
1105
- addLoadMoreBtn : function (onDemandMsg, loadingdatamsg, cb) {
1111
+ addLoadMoreBtn : function (onDemandMsg, loadingdatamsg, cb, infScroll) {
1106
1112
  // Show Load more button only if it not the last page
1107
- if (!this.options.isLastPage) {
1113
+ var $btnEl;
1114
+ if (!this.options.isLastPage || infScroll) {
1108
1115
  var self = this;
1109
1116
  var $parenEl = $('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');
1110
- var $btnEl = $parenEl.find('a');
1117
+ $btnEl = $parenEl.find('a');
1111
1118
  $btnEl.append(onDemandMsg);
1112
1119
  // Adding load more button in case of on demand pagination
1113
1120
  this.element.find('.app-grid-header-inner').append($parenEl);
1121
+ if(infScroll) {
1122
+ if(this.element.find('.on-demand-load-btn').length) {
1123
+ this.element.find('.on-demand-load-btn').text(this.options.viewlessmessage);
1124
+ }
1125
+ }
1126
+
1114
1127
  // Adding click event to the button
1115
1128
  $btnEl.on('click', function (e) {
1116
- if (cb && typeof cb === 'function') {
1117
- // when the button is clicked, hide the button and show loading indicator
1118
- $btnEl.hide();
1129
+ // when the button is clicked, hide the button and show loading indicator
1130
+ var lastPage = (self.options.getCurrentPage() == self.options.getPageCount());
1131
+ if(!lastPage) {
1119
1132
  self.showLoadingIndicator(loadingdatamsg, false);
1133
+ }
1134
+ if(!self.options.showviewlessbutton){
1135
+ $btnEl.hide();
1136
+ }
1137
+ if(infScroll) {
1138
+ if(lastPage) {
1139
+ self.element.find('.on-demand-datagrid').remove();
1140
+ }
1141
+ }
1142
+ // Fix for [WMS-23839] refresh data when clicked on View less button
1143
+ if (lastPage && self.options.showviewlessbutton) {
1144
+ $btnEl.hide();
1145
+ self.renderTableOnViewLess = true;
1146
+ self.renderPaginationOnViewLess = true;
1147
+ self.options.enableNavigation();
1148
+ self._renderGrid();
1149
+ }
1150
+ if (cb && typeof cb === 'function') {
1120
1151
  cb(e);
1121
1152
  }
1153
+
1122
1154
  });
1123
1155
  }
1156
+
1124
1157
  },
1125
1158
 
1126
1159
  /* Shows loading indicator when clicked on load more button or in case of infinite scroll event is triggered */
@@ -1153,10 +1186,19 @@ $.widget('wm.datatable', {
1153
1186
  if (!showLoadBtn && !infScroll) {
1154
1187
  // In case of on demand pagination, when the next page is not disabled hide the individual elements
1155
1188
  this.element.find('.loading-data-msg').hide();
1189
+ this.element.find('.on-demand-load-btn').text(this.options.ondemandmessage);
1156
1190
  this.element.find('.on-demand-load-btn').show();
1191
+ } else if((this.options.getCurrentPage() == this.options.getPageCount()) && this.options.showviewlessbutton) {
1192
+ this.element.find('.on-demand-load-btn').show().text(this.options.viewlessmessage);
1193
+ this.element.find('.loading-data-msg').hide();
1194
+ if(infScroll) {
1195
+ if(!this.element.find('.on-demand-load-btn').length) {
1196
+ this.options.addLoadMoreBtn();
1197
+ }
1198
+ this.element.find('.loading-data-msg').hide();
1199
+ }
1157
1200
  } else {
1158
- // In case of infinite scroll or when next page is disable hide the grid element which is the parent. If we don't the parent ele border will be shown
1159
- this.element.find('.on-demand-datagrid').hide();
1201
+ this.element.find('.on-demand-datagrid').hide();
1160
1202
  }
1161
1203
  },
1162
1204
 
@@ -1234,6 +1276,7 @@ $.widget('wm.datatable', {
1234
1276
  colDef = self.preparedHeaderData[id],
1235
1277
  $headerCell = self.gridContainer.find('th[data-col-id="' + id + '"]'),
1236
1278
  $tdCell = self.gridElement.find('td.app-datagrid-cell[data-col-id="' + id + '"]'),
1279
+ $footCell=self.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="' + id + '"]'),
1237
1280
  $headerCol = $(headerCols[id]),
1238
1281
  $bodyCol = $(bodyCols[id]),
1239
1282
  definedWidth,
@@ -1248,11 +1291,13 @@ $.widget('wm.datatable', {
1248
1291
  $tdCell.hide();
1249
1292
  $headerCol.hide();
1250
1293
  $bodyCol.hide();
1294
+ $footCell.hide();
1251
1295
  } else {
1252
1296
  $headerCell.show();
1253
1297
  $tdCell.show();
1254
1298
  $headerCol.show();
1255
1299
  $bodyCol.show();
1300
+ $footCell.show();
1256
1301
  }
1257
1302
  //If default width is set, reset the width so that correct width is set on reload
1258
1303
  if ($headerCol.length && $headerCol[0].style.width === '90px') {
@@ -1419,6 +1464,9 @@ $.widget('wm.datatable', {
1419
1464
  this.selectFirstRow(value);
1420
1465
  break;
1421
1466
  case 'data':
1467
+ if(!this.isResetSortIconsDone) {
1468
+ this.setSortIconDefault();
1469
+ }
1422
1470
  this.refreshGridData();
1423
1471
  break;
1424
1472
  case 'dataStates':
@@ -2372,6 +2420,7 @@ $.widget('wm.datatable', {
2372
2420
  },
2373
2421
  //Method to remove sort icons from the column header cells
2374
2422
  resetSortIcons: function ($el) {
2423
+ this.isResetSortIconsDone = true;
2375
2424
  var $sortContainer;
2376
2425
  //If sort icon is not passed, find out the sort icon from the active class
2377
2426
  if (!$el && this.gridHeaderElement) {
@@ -2381,9 +2430,25 @@ $.widget('wm.datatable', {
2381
2430
  }
2382
2431
  $el.removeClass('desc asc').removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon);
2383
2432
  },
2433
+ setSortIconDefault: function() {
2434
+ const sortInfo = this.options.sortInfo,
2435
+ $e = this.tableContainer,
2436
+ $th = $e.find("[data-col-field='" + sortInfo.field + "']"),
2437
+ $sortContainer = $th.find('.sort-buttons-container'),
2438
+ $sortIcon = $sortContainer.find('i.sort-icon'),
2439
+ direction = sortInfo.direction;
2440
+ if (direction === 'asc') {
2441
+ $sortIcon.addClass(direction + ' ' + this.options.cssClassNames.ascIcon);
2442
+ $sortContainer.addClass('active');
2443
+ } else if (direction === 'desc'){
2444
+ $sortIcon.addClass(direction + ' ' + this.options.cssClassNames.descIcon);
2445
+ $sortContainer.addClass('active');
2446
+ }
2447
+
2448
+ },
2384
2449
  /* Handles table sorting. */
2385
2450
  sortHandler: function (e) {
2386
- e.stopImmediatePropagation();
2451
+ e.stopImmediatePropagation();
2387
2452
  // If header span is clicked and column selection is enabled, call header click
2388
2453
  if ($(e.target).hasClass('header-data') && this.options.enableColumnSelection) {
2389
2454
  this.headerClickHandler(e);
@@ -2393,7 +2458,7 @@ $.widget('wm.datatable', {
2393
2458
  id = $th.attr('data-col-id'),
2394
2459
  $sortContainer = $th.find('.sort-buttons-container'),
2395
2460
  $sortIcon = $sortContainer.find('i.sort-icon'),
2396
- direction = $sortIcon.hasClass('asc') ? 'desc' : $sortIcon.hasClass('desc') ? '' : 'asc',
2461
+ direction = $sortIcon.hasClass('asc') ? 'desc' : 'asc',
2397
2462
  sortInfo = this.options.sortInfo,
2398
2463
  $previousSortMarker = this.gridHeaderElement.find('.sort-buttons-container.active'),
2399
2464
  field = $th.attr('data-col-field'),
@@ -2996,6 +3061,9 @@ $.widget('wm.datatable', {
2996
3061
  }
2997
3062
  });
2998
3063
  }
3064
+ if(!this.isResetSortIconsDone) {
3065
+ this.setSortIconDefault();
3066
+ }
2999
3067
  },
3000
3068
  addOrRemoveScroll: function () {
3001
3069
  var gridContent = this.gridContainer.find('tbody'),
@@ -3060,6 +3128,7 @@ $.widget('wm.datatable', {
3060
3128
  // initally append tbody to gridElement
3061
3129
  this.gridElement.append($htm);
3062
3130
  }
3131
+
3063
3132
  } else {
3064
3133
  var templates = this._getGridTemplate();
3065
3134
  $htm = $(templates);
@@ -3071,7 +3140,9 @@ $.widget('wm.datatable', {
3071
3140
  if (this.options.summaryRow) {
3072
3141
  var $summaryRowHtm = $(this._getSummaryRowTemplate());
3073
3142
  this.tableContainer.find('tfoot').remove();
3074
- this.tableContainer.append($summaryRowHtm);
3143
+ if (this.options.data.length){
3144
+ this.tableContainer.append($summaryRowHtm);
3145
+ }
3075
3146
  }
3076
3147
  // Set proper data status messages after the grid is rendered.
3077
3148
  if (!this.options.data.length && this.dataStatus.state === 'nodata') {
@@ -3082,7 +3153,7 @@ $.widget('wm.datatable', {
3082
3153
  this.setStatus(this.dataStatus.state, this.dataStatus.message, isCreated);
3083
3154
  }
3084
3155
  this.gridBody = this.gridElement.find('tbody');
3085
- this.gridFooter = this.gridElement.find('tfoot');
3156
+ this.gridFooter = this.tableContainer.find('tfoot');
3086
3157
  this._findAndReplaceCompiledTemplates();
3087
3158
  this.options.clearRowActions();
3088
3159
  // attach event handlers
@@ -3126,7 +3197,7 @@ $.widget('wm.datatable', {
3126
3197
  '<div class="app-grid-header">' +
3127
3198
  '<div class="app-grid-header-inner">' +
3128
3199
  '<table tabindex="0" class="' + this.options.cssClassNames.gridDefault + ' ' + this.options.cssClassNames.grid + '">' +
3129
- '<thead tabindex="0" class="table-header" id="table_header_' + this.tableId + '">' +
3200
+ '<thead tabindex="0" class="table-header thead-sticky" id="table_header_' + this.tableId + '">' +
3130
3201
  '</thead><tbody class="app-grid-content app-datagrid-body" id="table_' + this.tableId + '">' +
3131
3202
  '</tbody></table>' +
3132
3203
  '</div></div></div>',
@@ -3170,13 +3241,16 @@ $.widget('wm.datatable', {
3170
3241
  this._toggleSpacingClasses('condensed');
3171
3242
  }
3172
3243
  this._renderGrid(isCreated);
3244
+ this.addNavigationControls();
3245
+ },
3246
+ addNavigationControls: function() {
3173
3247
  /**
3174
3248
  * bind on demand / scroll events to the table in case of dynamictable in render fn
3175
3249
  * Render is called everytime when there is a change in dataset and the previously binded events are lost
3176
3250
  */
3177
3251
  if (this.options.isdynamictable) {
3178
- this.element.find('.on-demand-datagrid').remove();
3179
- if (this.options.navigation === 'On-Demand' && !this.element.find('.on-demand-datagrid').length) {
3252
+ this.element.find('.on-demand-datagrid').remove();
3253
+ if (this.options.navigation === 'On-Demand' && (!this.element.find('.on-demand-datagrid').length)) {
3180
3254
  this.options.addLoadMoreBtn();
3181
3255
  } else if (this.options.navigation === 'Scroll') {
3182
3256
  this.options.bindScrollEvt();
@@ -3196,7 +3270,8 @@ $.widget('wm.datatable', {
3196
3270
  if (state === 'ready') {
3197
3271
  this.dataStatusContainer.hide();
3198
3272
  } else {
3199
- if (this.options.isNavTypeScrollOrOndemand() && (state === 'nodata' || this.options.isLastPage)) {
3273
+ // [WMS-23839] always show load more btn if show view less btn is true
3274
+ if (this.options.isNavTypeScrollOrOndemand() && (state === 'nodata' || ((this.options.getCurrentPage() == this.options.getPageCount()) && !this.options.showviewlessbutton))) {
3200
3275
  this.element.find('.on-demand-datagrid a').hide();
3201
3276
  }
3202
3277
  this.dataStatusContainer.show();
@@ -3283,12 +3358,6 @@ $.widget('wm.datatable', {
3283
3358
  }
3284
3359
  this.options[key] = value;
3285
3360
  if (key === 'height') {
3286
- if(this.options.showHeader) {
3287
- // this._setStyles(this.gridHeaderElement, 'z-index: 1; position: sticky; top:0px;');
3288
- $thead = this.gridHeaderElement;
3289
- $thead.addClass("thead-sticky");
3290
- }
3291
-
3292
3361
  // if(this.dataStatus.state != 'loading') {
3293
3362
  var elements = this.gridHeaderElement.find('th');
3294
3363
  // this._setStyles(this.tableContainer, 'border-collapse: separate;');