We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e5cdb1 commit a52cf40Copy full SHA for a52cf40
src/examples/basicExample/app.js
@@ -124,6 +124,11 @@ class App extends Component {
124
},
125
],
126
127
+ {
128
+ title: 'You cannot give this children',
129
+ subtitle: 'Dropping is prevented via the `canDrop` API using `nextParent`',
130
+ noChildren: true,
131
+ },
132
{
133
title: 'When node contents are really long, it will cause a horizontal scrollbar' +
134
' to appear. Deeply nested elements will also trigger the scrollbar.',
@@ -282,6 +287,7 @@ class App extends Component {
282
287
maxDepth={maxDepth}
283
288
searchQuery={searchString}
284
289
searchFocusOffset={searchFocusIndex}
290
+ canDrop={({ nextParent }) => !nextParent || !nextParent.noChildren}
285
291
searchFinishCallback={matches =>
286
292
this.setState({
293
searchFoundCount: matches.length,
0 commit comments