Skip to content

Commit

Permalink
build: new build
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamilenkovic committed Mar 5, 2024
1 parent 8166146 commit ce8f9aa
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formkit/drag-and-drop",
"version": "0.0.23",
"version": "0.0.24",
"description": "Drag and drop package.",
"main": "./index.cjs",
"types": "./index.d.cts",
Expand Down
4 changes: 3 additions & 1 deletion dist/react/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ function useDragAndDrop(list, options = {}) {
const [values, setValues2] = (0, import_react.useState)(list);
(0, import_react.useEffect)(() => {
dragAndDrop({ parent, state: [values, setValues2], ...options });
}, [values]);
(0, import_react.useEffect)(() => {
return () => {
if (parent.current)
(0, import__.tearDown)(parent.current);
};
}, [parent.current]);
}, []);
return [parent, values, setValues2];
}
// Annotate the CommonJS export names for ESM import in node:
Expand Down
2 changes: 1 addition & 1 deletion dist/react/index.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/react/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ function useDragAndDrop(list, options = {}) {
const [values, setValues2] = useState(list);
useEffect(() => {
dragAndDrop({ parent, state: [values, setValues2], ...options });
}, [values]);
useEffect(() => {
return () => {
if (parent.current)
tearDown(parent.current);
};
}, [parent.current]);
}, []);
return [parent, values, setValues2];
}
export {
Expand Down
Loading

0 comments on commit ce8f9aa

Please sign in to comment.