@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.mjs CHANGED
@@ -917,12 +917,16 @@ function getColumnPinningStyles(column) {
917
917
  return { classes, style };
918
918
  }
919
919
  function getRowClickHandlers(handler, { rowData, row, table }) {
920
- const handleRowClick = (event, clickType) => {
921
- handler(rowData, { event, row, table, clickType });
920
+ const handleClick = (event) => {
921
+ if (event.detail === 1) {
922
+ handler(rowData, { event, row, table, clickType: "single" });
923
+ }
924
+ if (event.detail >= 2) {
925
+ handler(rowData, { event, row, table, clickType: "double" });
926
+ }
922
927
  };
923
928
  return {
924
- onClick: (event) => handleRowClick(event, "single"),
925
- onDoubleClick: (event) => handleRowClick(event, "double")
929
+ onClick: handleClick
926
930
  };
927
931
  }
928
932
  var fallbackData = [];