trotl-table 1.0.40 → 1.0.41

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.
package/dist/Table.cjs.js CHANGED
@@ -10469,19 +10469,24 @@ function TableInner({
10469
10469
  }
10470
10470
  });
10471
10471
  }
10472
+ // handler called when user double-clicks a row container
10472
10473
  const handleRowDoubleClick = e => {
10473
10474
  if (!doubleClickEnable) return;
10474
- // ignore double-clicks on action buttons or inputs
10475
- if (e.target.closest('.action-btn-table') || e.target.closest('input') || e.target.closest('button')) {
10475
+ // ignore any clicks that happened inside interactive regions
10476
+ // - the action cell (covers all the buttons)
10477
+ // - checkboxes
10478
+ // - any button, input, or link
10479
+ if (e.target.closest('.action-cell') || e.target.closest('.checkbox-cell') || e.target.closest('button') || e.target.closest('input') || e.target.closest('a')) {
10476
10480
  return;
10477
10481
  }
10482
+ // finally invoke edit callback
10478
10483
  editCallbackRef.current(row);
10479
10484
  };
10480
10485
  const content = /*#__PURE__*/React.createElement("div", {
10481
10486
  key: key,
10482
10487
  style: style,
10483
10488
  className: "table-row",
10484
- onDoubleClick: handleRowDoubleClick
10489
+ onDoubleClick: doubleClickEnable ? handleRowDoubleClick : undefined
10485
10490
  }, enableMultiSelect && showDelete && /*#__PURE__*/React.createElement("div", {
10486
10491
  className: "table-cell checkbox-cell"
10487
10492
  }, /*#__PURE__*/React.createElement("input", {