File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ const customWildcardFieldTarget: DropTargetSpec<CustomWildcardFieldDropZoneProps
5656 return ;
5757 }
5858
59+ // Casting to DraggedFieldIdentifier because of bad TS type inference
60+ // It does not realize that the object contains the property `fieldDef`
61+ // We do the same thing in `encoding-shelf.tsx for `encodingShelfTarget`
5962 const { fieldDef} = monitor . getItem ( ) as DraggedFieldIdentifier ;
6063 const type = fieldDef . type ;
6164
@@ -81,6 +84,9 @@ const customWildcardFieldTarget: DropTargetSpec<CustomWildcardFieldDropZoneProps
8184 } ) ;
8285 } ,
8386 canDrop ( props , monitor ) {
87+ // Casting to DraggedFieldIdentifier because of bad TS type inference
88+ // It does not realize that the object contains the property `fieldDef`
89+ // We do the same thing in `encoding-shelf.tsx for `encodingShelfTarget`
8490 const { fieldDef} = monitor . getItem ( ) as DraggedFieldIdentifier ;
8591 return fieldDef . field !== '*' ;
8692 }
You can’t perform that action at this time.
0 commit comments