Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenyz committed Jan 28, 2020
1 parent a70e076 commit 0ccf560
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ class Example extends Component {
super(props);

this.state = {
className: undefined,
onXReachEnd: null,
};
}

componentDidMount() {
setTimeout(() => {
this.setState({
className: 'dummy',
onXReachEnd: () => logEvent('onXReachEnd'),
});
}, 5000);
Expand All @@ -32,11 +34,12 @@ class Example extends Component {
}

render() {
const { onXReachEnd } = this.state;
const { className, onXReachEnd } = this.state;

return (
<div className="example">
<ScrollBar
className={className}
onScrollY={() => logEvent('onScrollY')}
onScrollX={() => logEvent('onScrollX')}
onScrollUp={() => logEvent('onScrollUp')}
Expand Down

0 comments on commit 0ccf560

Please sign in to comment.