@trackunit/react-compound-components 0.0.2 → 0.0.4

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
@@ -150,7 +150,7 @@ const ConfirmationDialogContextProvider = ({ children }) => {
150
150
  closeModal();
151
151
  } })), [confirmationDialogProps, isOpen, resolveAction, closeModal]);
152
152
  const confirm = React__namespace.useCallback((props) => __awaiter(void 0, void 0, void 0, function* () {
153
- setConfirmationDialogProps(props);
153
+ setConfirmationDialogProps(prev => (Object.assign(Object.assign({}, prev), props)));
154
154
  setIsOpen(true);
155
155
  return new Promise(resolve => {
156
156
  setResolveAction(() => resolve);
package/index.esm.js CHANGED
@@ -127,7 +127,7 @@ const ConfirmationDialogContextProvider = ({ children }) => {
127
127
  closeModal();
128
128
  } })), [confirmationDialogProps, isOpen, resolveAction, closeModal]);
129
129
  const confirm = React.useCallback((props) => __awaiter(void 0, void 0, void 0, function* () {
130
- setConfirmationDialogProps(props);
130
+ setConfirmationDialogProps(prev => (Object.assign(Object.assign({}, prev), props)));
131
131
  setIsOpen(true);
132
132
  return new Promise(resolve => {
133
133
  setResolveAction(() => resolve);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-compound-components",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -38,4 +38,4 @@ export interface ConfirmationDialogProps extends ConfirmationDialogPropsActual {
38
38
  *
39
39
  * **ATTENTION:** In the Manager and Iris Apps, this hook will "just work". If you are using the hook in a custom setup, you need to wrap your app in the ConfirmationDialogContextProvider.
40
40
  */
41
- export declare const UseTableSelectionDemoComponent: (props: ConfirmationDialogProps) => JSX.Element;
41
+ export declare const UseConfirmationDialogDemoComponent: (props: ConfirmationDialogProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
2
  import { useConfirmationDialog } from "@trackunit/react-core-hooks";
3
- import { UseTableSelectionDemoComponent } from "./useConfirmationDialog.demo";
4
- type Story = StoryObj<typeof UseTableSelectionDemoComponent>;
3
+ import { UseConfirmationDialogDemoComponent } from "./useConfirmationDialog.demo";
4
+ type Story = StoryObj<typeof UseConfirmationDialogDemoComponent>;
5
5
  declare const meta: Meta<typeof useConfirmationDialog>;
6
6
  export default meta;
7
7
  export declare const packageName: () => JSX.Element;