@trackunit/react-table 0.0.534 → 0.0.535

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/index.cjs.js CHANGED
@@ -174,7 +174,7 @@ const ActionButton = ({ action, children, id, ...rest }) => {
174
174
  if (action.type === "route") {
175
175
  return (jsxRuntime.jsx(reactComponents.Button, { asChild: true, id: id, variant: "ghost-neutral", ...rest, children: jsxRuntime.jsx(reactRouter.Link, { to: action.url, children: children }) }));
176
176
  }
177
- return (jsxRuntime.jsx(reactComponents.Button, { id: id, onClick: action.method, variant: "ghost-neutral", ...rest, children: children }));
177
+ return (jsxRuntime.jsx(reactComponents.Button, { id: id, onClick: e => action.method(e), variant: "ghost-neutral", ...rest, children: children }));
178
178
  };
179
179
  /**
180
180
  * Converts an action model to a MenuItem component.
package/index.esm.js CHANGED
@@ -155,7 +155,7 @@ const ActionButton = ({ action, children, id, ...rest }) => {
155
155
  if (action.type === "route") {
156
156
  return (jsx(Button, { asChild: true, id: id, variant: "ghost-neutral", ...rest, children: jsx(Link, { to: action.url, children: children }) }));
157
157
  }
158
- return (jsx(Button, { id: id, onClick: action.method, variant: "ghost-neutral", ...rest, children: children }));
158
+ return (jsx(Button, { id: id, onClick: e => action.method(e), variant: "ghost-neutral", ...rest, children: children }));
159
159
  };
160
160
  /**
161
161
  * Converts an action model to a MenuItem component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "0.0.534",
3
+ "version": "0.0.535",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -4,7 +4,7 @@ type IconExposedProp = Omit<IconProps, "color" | "onclick" | "type" | "name">;
4
4
  export type ActionModel = (MethodAction | RouteAction) & CommonAction;
5
5
  export type MethodAction = {
6
6
  type: "method";
7
- method: () => void;
7
+ method: (e: React.MouseEvent) => void;
8
8
  };
9
9
  export type RouteAction = {
10
10
  type: "route";