@jasperoosthoek/react-toolbox 0.5.4 → 0.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jasperoosthoek/react-toolbox",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "author": "jasperoosthoek",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,13 +31,6 @@
31
31
  "css-loader": "^6.7.1",
32
32
  "jest": "^29.5.0",
33
33
  "jest-environment-jsdom": "^29.5.0",
34
- "moment": "^2.29.4",
35
- "react": "^18.3.1",
36
- "react-bootstrap": "^2.7.4",
37
- "react-dnd": "^16.0.1",
38
- "react-dom": "^18.3.1",
39
- "react-icons": "^5.3.0",
40
- "react-localization": "^1.0.19",
41
34
  "style-loader": "^3.3.1",
42
35
  "ts-jest": "^29.1.0",
43
36
  "ts-loader": "^9.4.2",
@@ -1,3 +1,4 @@
1
+ import { useDragDropManager } from 'react-dnd';
1
2
  import React, {
2
3
  useEffect,
3
4
  useState,
@@ -26,9 +27,14 @@ import { DragAndDropList, DragAndDropListComponent, DragAndDropListComponentProp
26
27
  import { useLocalization } from '../../localization/LocalizationContext';
27
28
  import { useCreateEditModal } from '../forms/CreateEditModalProvider';
28
29
 
29
- const PaginationButton = (props: ButtonProps) => (
30
+ const PaginationButton = (props: ButtonProps) => {
31
+
32
+ const manager = useDragDropManager();
33
+ console.log({ manager })
34
+ return (
30
35
  <Button variant='outline-secondary' size='sm' {...props} />
31
36
  )
37
+ }
32
38
 
33
39
  export type OrderByColumn<R> = string | ((row: R) => string | number);
34
40
 
@@ -111,6 +117,9 @@ export const DataTable = <D extends any[]>({
111
117
  }: DataTableProps<D>) => {
112
118
  const { showEditModal } = useCreateEditModal()
113
119
  type R = D[number];
120
+
121
+ const manager = useDragDropManager();
122
+ console.log({ manager })
114
123
 
115
124
  if (Object.keys(restProps).length !== 0) console.error('Unrecognised props:', restProps);
116
125