File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ export interface MosaicBaseProps<T extends MosaicKey> {
206
206
* default: 'bp3'
207
207
*/
208
208
blueprintNamespace? : string ;
209
+ /**
210
+ * Override the react-dnd provider to allow applications to inject an existing drag and drop context
211
+ */
212
+ dragAndDropManager? : DragDropManager | undefined ;
209
213
}
210
214
211
215
export interface MosaicControlledProps <T extends MosaicKey > extends MosaicBaseProps <T > {
Original file line number Diff line number Diff line change 68
68
"@types/webpack" : " ^3.8.21" ,
69
69
"chai" : " ^4.3.6" ,
70
70
"css-loader" : " ^0.28.11" ,
71
+ "dnd-core" : " 14.0.1" ,
71
72
"file-loader" : " ^1.1.11" ,
72
73
"html-loader" : " ^0.5.5" ,
73
74
"html-webpack-plugin" : " ^2.30.1" ,
Original file line number Diff line number Diff line change 1
1
import classNames from 'classnames' ;
2
+ import { DragDropManager } from 'dnd-core' ;
2
3
import countBy from 'lodash/countBy' ;
3
4
import keys from 'lodash/keys' ;
4
5
import pickBy from 'lodash/pickBy' ;
@@ -58,6 +59,10 @@ export interface MosaicBaseProps<T extends MosaicKey> {
58
59
* default: 'bp3'
59
60
*/
60
61
blueprintNamespace ?: string ;
62
+ /**
63
+ * Override the react-dnd provider to allow applications to inject an existing drag and drop context
64
+ */
65
+ dragAndDropManager ?: DragDropManager | undefined ;
61
66
}
62
67
63
68
export interface MosaicControlledProps < T extends MosaicKey > extends MosaicBaseProps < T > {
@@ -217,7 +222,11 @@ export class MosaicWithoutDragDropContext<T extends MosaicKey = string> extends
217
222
export class Mosaic < T extends MosaicKey = string > extends React . PureComponent < MosaicProps < T > > {
218
223
render ( ) {
219
224
return (
220
- < DndProvider backend = { MultiBackend } options = { HTML5ToTouch } >
225
+ < DndProvider
226
+ backend = { MultiBackend }
227
+ options = { HTML5ToTouch }
228
+ { ...( this . props . dragAndDropManager && { manager : this . props . dragAndDropManager } ) }
229
+ >
221
230
< MosaicWithoutDragDropContext < T > { ...this . props } />
222
231
</ DndProvider >
223
232
) ;
You can’t perform that action at this time.
0 commit comments