Skip to content

Commit 5e860a1

Browse files
committed
Update examples (#10)
1 parent a4c30ea commit 5e860a1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/bundle.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22012,6 +22012,9 @@ var Tree = function (_PureComponent) {
2201222012
}
2201322013
},
2201422014
onScroll: function onScroll(scrollOffset, event) {
22015+
var child = event.target.firstChild;
22016+
var treeViewportHeight = 400;
22017+
console.log((scrollOffset / (child.scrollHeight - treeViewportHeight) * 100).toFixed(2));
2201522018
console.log('onScroll', scrollOffset, event);
2201622019
},
2201722020
onContentWillUpdate: function onContentWillUpdate() {

docs/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/Tree.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ class Tree extends PureComponent {
133133
}
134134
}}
135135
onScroll={(scrollOffset, event) => {
136+
const child = event.target.firstChild;
137+
const treeViewportHeight = 400;
138+
console.log((scrollOffset / (child.scrollHeight - treeViewportHeight) * 100).toFixed(2));
136139
console.log('onScroll', scrollOffset, event);
137140
}}
138141
onContentWillUpdate={() => {

0 commit comments

Comments
 (0)