@sustaina/shared-ui 1.8.1 → 1.8.2

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/index.js CHANGED
@@ -946,12 +946,16 @@ function getColumnPinningStyles(column) {
946
946
  return { classes, style };
947
947
  }
948
948
  function getRowClickHandlers(handler, { rowData, row, table }) {
949
- const handleRowClick = (event, clickType) => {
950
- handler(rowData, { event, row, table, clickType });
949
+ const handleClick = (event) => {
950
+ if (event.detail === 1) {
951
+ handler(rowData, { event, row, table, clickType: "single" });
952
+ }
953
+ if (event.detail >= 2) {
954
+ handler(rowData, { event, row, table, clickType: "double" });
955
+ }
951
956
  };
952
957
  return {
953
- onClick: (event) => handleRowClick(event, "single"),
954
- onDoubleClick: (event) => handleRowClick(event, "double")
958
+ onClick: handleClick
955
959
  };
956
960
  }
957
961
  var fallbackData = [];