@wavemaker/app-ng-runtime 11.6.1-rc.5528 → 11.6.2-next.1417101

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.
@@ -964,7 +964,6 @@ $.widget('wm.datatable', {
964
964
  gridElement: null,
965
965
  gridHeader: null,
966
966
  gridBody: null,
967
- columnClickInfo: {},
968
967
  gridFooter: null,
969
968
  gridSearch: null,
970
969
  tableId: null,
@@ -1663,9 +1662,6 @@ $.widget('wm.datatable', {
1663
1662
  // triggered on capture phase of click listener.
1664
1663
  // sets the selected rowdata on click.
1665
1664
  rowClickHandlerOnCapture: function (e, $row, options) {
1666
- if(this.getColInfo(e) && (e.target.type != 'checkbox')) {
1667
- return;
1668
- }
1669
1665
  $row = $row || $(e.target).closest('tr.app-datagrid-row');
1670
1666
  var gridRow = this.gridElement.find($row);
1671
1667
  // WMS-21139 trigger selectedItems change when the captured click is on the current table but not on child table
@@ -1679,9 +1675,6 @@ $.widget('wm.datatable', {
1679
1675
 
1680
1676
  /* Handles row selection. */
1681
1677
  rowSelectionHandler: function (e, $row, options) {
1682
- if(this.getColInfo(e) && (e.target.type != 'checkbox')) {
1683
- return;
1684
- }
1685
1678
  options = options || {};
1686
1679
  var rowId,
1687
1680
  rowData,
@@ -2691,40 +2684,18 @@ $.widget('wm.datatable', {
2691
2684
  }
2692
2685
  return false;
2693
2686
  },
2694
- getColInfo: function(event) {
2695
- var row = $(event.target).closest('tr.app-datagrid-row');
2696
- var rowId = row.attr('data-row-id');
2697
- var column = $(event.target).closest('td.app-datagrid-cell');
2698
- var colId = column.attr('data-col-id');
2699
- if(this.columnClickInfo && this.columnClickInfo[rowId] && this.columnClickInfo[rowId][colId]) {
2700
- return this.columnClickInfo[rowId][colId];
2701
- }
2702
- return false;
2703
- },
2704
2687
  /* Attaches all event handlers for the table. */
2705
2688
  attachEventHandlers: function ($htm) {
2706
2689
  var $header = this.gridHeaderElement,
2707
2690
  self = this;
2708
2691
 
2709
2692
  if (this.options.enableRowSelection) {
2710
- $htm[0].removeEventListener('click', this.rowClickHandlerOnCapture.bind(this));
2693
+ $htm[0].removeEventListener('click', this.rowClickHandlerOnCapture.bind(this), true);
2711
2694
  $htm.off();
2712
- $htm[0].addEventListener('click', this.rowClickHandlerOnCapture.bind(this));
2713
2695
  // add js click handler for capture phase in order to first listen on grid and
2714
2696
  // assign selectedItems so that any child actions can have access to the selectedItems.
2697
+ $htm[0].addEventListener('click', this.rowClickHandlerOnCapture.bind(this), true);
2715
2698
  $htm.on('click', this.rowSelectionHandler.bind(this));
2716
- $htm.on("click", "td *", function(event) {
2717
-
2718
- // Prevent propagation to parent elements
2719
- if(event.target.type != 'checkbox'){
2720
- var row = $(event.target).closest('tr.app-datagrid-row');
2721
- var rowId = row.attr('data-row-id');
2722
- var column = $(event.target).closest('td.app-datagrid-cell');
2723
- var colId = column.attr('data-col-id');
2724
- self.columnClickInfo[rowId] = {};
2725
- self.columnClickInfo[rowId][colId] = true;
2726
- }
2727
- });
2728
2699
  $htm.on('dblclick', this.rowDblClickHandler.bind(this));
2729
2700
  $htm.on('keydown', this.onKeyDown.bind(this));
2730
2701
  }