Skip to content

Commit d28a76e

Browse files
committed
Using own version of react-dnd-scrollzone
1 parent a5fc7a5 commit d28a76e

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"prop-types": "^15.6.1",
6363
"react-dnd": "^6.0.0",
6464
"react-dnd-html5-backend": "^6.0.0",
65-
"react-dnd-scrollzone": "github:eaglus/react-dnd-scrollzone.git#4.0.0-spotware-patch-3",
65+
"react-dnd-scrollzone": "github:dolezel/react-dnd-scrollzone.git#41203ef00c991f744aa87e897d7d518d32f6a994",
6666
"react-lifecycles-compat": "^3.0.4",
6767
"react-virtualized": "^9.19.1"
6868
},

src/react-sortable-tree.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
33
import { AutoSizer, List } from 'react-virtualized';
44
import isEqual from 'lodash.isequal';
55
import withScrolling, {
6+
createScrollingComponent,
67
createVerticalStrength,
78
createHorizontalStrength,
89
} from 'react-dnd-scrollzone';
@@ -97,7 +98,7 @@ class ReactSortableTree extends Component {
9798

9899
// Prepare scroll-on-drag options for this list
99100
if (isVirtualized) {
100-
this.scrollZoneVirtualList = withScrolling(List);
101+
this.scrollZoneVirtualList = (createScrollingComponent || withScrolling)(List);
101102
this.vStrength = createVerticalStrength(slideRegionSize);
102103
this.hStrength = createHorizontalStrength(slideRegionSize);
103104
}
@@ -604,6 +605,7 @@ class ReactSortableTree extends Component {
604605

605606
render() {
606607
const {
608+
dragDropManager,
607609
style,
608610
className,
609611
innerStyle,
@@ -684,6 +686,7 @@ class ReactSortableTree extends Component {
684686
{({ height, width }) => (
685687
<ScrollZoneVirtualList
686688
{...scrollToInfo}
689+
dragDropManager={dragDropManager}
687690
verticalStrength={this.vStrength}
688691
horizontalStrength={this.hStrength}
689692
speed={30}

stories/__snapshots__/storyshots.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2829,7 +2829,7 @@ exports[`Storyshots Basics Add and remove nodes programmatically 1`] = `
28292829
</button>
28302830
<br />
28312831
<label
2832-
Htmlfor="addAsFirstChild"
2832+
htmlFor="addAsFirstChild"
28332833
>
28342834
Add new nodes at start
28352835
<input

stories/add-remove.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default class App extends Component {
126126
Add more
127127
</button>
128128
<br />
129-
<label Htmlfor="addAsFirstChild">
129+
<label htmlFor="addAsFirstChild">
130130
Add new nodes at start
131131
<input
132132
name="addAsFirstChild"

yarn.lock

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9678,26 +9678,17 @@ react-dnd-html5-backend@^6.0.0:
96789678
dnd-core "^6.0.0"
96799679
lodash "^4.17.11"
96809680

9681-
react-dnd-scrollzone@^4.0.0:
9681+
react-dnd-scrollzone@^4.0.0, "react-dnd-scrollzone@github:dolezel/react-dnd-scrollzone.git#41203ef00c991f744aa87e897d7d518d32f6a994":
96829682
version "4.0.0"
9683-
resolved "https://registry.yarnpkg.com/react-dnd-scrollzone/-/react-dnd-scrollzone-4.0.0.tgz#d707170c0cd3b7ab3d991dd6a8cc0b3712454139"
9684-
integrity sha1-1wcXDAzTt6s9mR3WqMwLNxJFQTk=
9683+
resolved "git://github.com/dolezel/react-dnd-scrollzone#41203ef00c991f744aa87e897d7d518d32f6a994"
96859684
dependencies:
9686-
hoist-non-react-statics "^1.2.0"
9687-
lodash.throttle "^4.0.1"
9688-
prop-types "^15.5.9"
9689-
raf "^3.2.0"
9690-
react-display-name "^0.2.0"
9691-
9692-
"react-dnd-scrollzone@github:eaglus/react-dnd-scrollzone.git#4.0.0-spotware-patch-3":
9693-
version "4.0.0-spotware-patch-3"
9694-
resolved "https://codeload.github.com/eaglus/react-dnd-scrollzone/tar.gz/bf512572090ebcef30e04262e8755ef283a774b7"
9695-
dependencies:
9696-
hoist-non-react-statics "^1.2.0"
9685+
hoist-non-react-statics "^3.1.0"
96979686
lodash.throttle "^4.0.1"
96989687
prop-types "^15.5.9"
96999688
raf "^3.2.0"
9689+
react "^16.3.0"
97009690
react-display-name "^0.2.0"
9691+
react-dom "^16.3.0"
97019692

97029693
97039694
version "6.0.0"
@@ -9751,7 +9742,7 @@ react-docgen@^3.0.0-rc.1:
97519742
node-dir "^0.1.10"
97529743
recast "^0.16.0"
97539744

9754-
react-dom@^16.4.0:
9745+
react-dom@^16.3.0, react-dom@^16.4.0:
97559746
version "16.6.3"
97569747
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.6.3.tgz#8fa7ba6883c85211b8da2d0efeffc9d3825cccc0"
97579748
integrity sha512-8ugJWRCWLGXy+7PmNh8WJz3g1TaTUt1XyoIcFN+x0Zbkoz+KKdUyx1AQLYJdbFXjuF41Nmjn5+j//rxvhFjgSQ==
@@ -9897,7 +9888,7 @@ react-virtualized@^9.13.0, react-virtualized@^9.19.1:
98979888
prop-types "^15.6.0"
98989889
react-lifecycles-compat "^3.0.4"
98999890

9900-
react@^16.4.0:
9891+
react@^16.3.0, react@^16.4.0:
99019892
version "16.6.3"
99029893
resolved "https://registry.yarnpkg.com/react/-/react-16.6.3.tgz#25d77c91911d6bbdd23db41e70fb094cc1e0871c"
99039894
integrity sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw==

0 commit comments

Comments
 (0)