mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #23935 from philnova/patch-1
Add tag to SortEvent in react-sortable-hoc
This commit is contained in:
Vendored
+7
-1
@@ -18,6 +18,12 @@ export interface SortStart {
|
||||
|
||||
export type SortEvent = React.MouseEvent<any> | React.TouchEvent<any>;
|
||||
|
||||
export type SortEventWithTag = SortEvent & {
|
||||
target: {
|
||||
tagName: string
|
||||
}
|
||||
};
|
||||
|
||||
export type SortStartHandler = (sort: SortStart, event: SortEvent) => void;
|
||||
|
||||
export type SortMoveHandler = (event: SortEvent) => void;
|
||||
@@ -45,7 +51,7 @@ export interface SortableContainerProps {
|
||||
pressDelay?: number;
|
||||
pressThreshold?: number;
|
||||
distance?: number;
|
||||
shouldCancelStart?: (event: SortEvent) => boolean;
|
||||
shouldCancelStart?: (event: SortEvent | SortEventWithTag) => boolean;
|
||||
onSortStart?: SortStartHandler;
|
||||
onSortMove?: SortMoveHandler;
|
||||
onSortEnd?: SortEndHandler;
|
||||
|
||||
Reference in New Issue
Block a user