@etsoo/react 1.3.95 → 1.3.96
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/lib/mu/DnDList.d.ts +3 -3
- package/package.json +1 -1
- package/src/mu/DnDList.tsx +3 -8
package/lib/mu/DnDList.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React, { CSSProperties } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* DnD list props
|
|
4
4
|
*/
|
|
5
|
-
export interface DnDListProps<D extends {},
|
|
5
|
+
export interface DnDListProps<D extends {}, E extends React.ElementType> {
|
|
6
6
|
/**
|
|
7
7
|
* Item renderer
|
|
8
8
|
*/
|
|
@@ -27,7 +27,7 @@ export interface DnDListProps<D extends {}, L extends keyof D, E extends React.E
|
|
|
27
27
|
/**
|
|
28
28
|
* Label field
|
|
29
29
|
*/
|
|
30
|
-
labelField:
|
|
30
|
+
labelField: keyof D;
|
|
31
31
|
/**
|
|
32
32
|
* Load data
|
|
33
33
|
*/
|
|
@@ -46,4 +46,4 @@ export interface DnDListProps<D extends {}, L extends keyof D, E extends React.E
|
|
|
46
46
|
* @param props Props
|
|
47
47
|
* @returns Component
|
|
48
48
|
*/
|
|
49
|
-
export declare function DnDList<D extends {},
|
|
49
|
+
export declare function DnDList<D extends {}, E extends React.ElementType = React.ElementType>(props: DnDListProps<D, E>): JSX.Element;
|
package/package.json
CHANGED
package/src/mu/DnDList.tsx
CHANGED
|
@@ -10,11 +10,7 @@ import {
|
|
|
10
10
|
/**
|
|
11
11
|
* DnD list props
|
|
12
12
|
*/
|
|
13
|
-
export interface DnDListProps<
|
|
14
|
-
D extends {},
|
|
15
|
-
L extends keyof D,
|
|
16
|
-
E extends React.ElementType
|
|
17
|
-
> {
|
|
13
|
+
export interface DnDListProps<D extends {}, E extends React.ElementType> {
|
|
18
14
|
/**
|
|
19
15
|
* Item renderer
|
|
20
16
|
*/
|
|
@@ -48,7 +44,7 @@ export interface DnDListProps<
|
|
|
48
44
|
/**
|
|
49
45
|
* Label field
|
|
50
46
|
*/
|
|
51
|
-
labelField:
|
|
47
|
+
labelField: keyof D;
|
|
52
48
|
|
|
53
49
|
/**
|
|
54
50
|
* Load data
|
|
@@ -76,9 +72,8 @@ export interface DnDListProps<
|
|
|
76
72
|
*/
|
|
77
73
|
export function DnDList<
|
|
78
74
|
D extends {},
|
|
79
|
-
L extends keyof D,
|
|
80
75
|
E extends React.ElementType = React.ElementType
|
|
81
|
-
>(props: DnDListProps<D,
|
|
76
|
+
>(props: DnDListProps<D, E>) {
|
|
82
77
|
// Destruct
|
|
83
78
|
const {
|
|
84
79
|
children,
|