Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/basic-keydown/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ class Section extends React.Component{
<div className="container-fluid">
<div className="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul className="nav navbar-nav">
<li> <input onKeyDown={e => {() => console.log("keydown"), scroll.scrollMore(500) }}/>
<li> <input onKeyDown={e => {
console.log("keydown");
scroll.scrollMore(500);
e.stopPropagation();
}}/>
<a onClick={() => scroll.scrollTo(100)}>Scroll To 100!</a>
</li>
</ul>
Expand Down
6 changes: 4 additions & 2 deletions modules/__tests__/scroll-cancellation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ describe('Scroll cancelation', () => {
const distance = 100;

class TestComponent extends React.Component {
handleKeyDown = () => {
handleKeyDown = (e) => {
scroll.scrollMore(distance, { smooth: true, duration });
e.stopPropagation();
}
render() {
return (
Expand Down Expand Up @@ -65,8 +66,9 @@ describe('Scroll cancelation', () => {
const distance = 100;

class TestComponent extends React.Component {
handleKeyDown = () => {
handleKeyDown = (e) => {
scroll.scrollMore(distance, { smooth: true, duration, horizontal: true });
e.stopPropagation();
}
render() {
return (
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"webpack-dev-server": "^2.11.5"
},
"peerDependencies": {
"react": "^15.5.4 || ^16.0.0 || ^17.0.0",
"react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0"
"react": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0"
},
"babel": {
"presets": [
Expand Down