@rsuite/document-nav
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -135,3 +135,3 @@ 'use strict'; | ||
} | ||
this.scrollListener = function () { | ||
this.scrollListener = (0, _throttle2.default)(function () { | ||
var index = 0; | ||
@@ -166,4 +166,4 @@ var activeAnchor = _this2.state.activeAnchor; | ||
} | ||
}; | ||
window.addEventListener('scroll', (0, _throttle2.default)(this.scrollListener, 300)); | ||
}, 300); | ||
window.addEventListener('scroll', this.scrollListener); | ||
} | ||
@@ -170,0 +170,0 @@ |
{ | ||
"name": "@rsuite/document-nav", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Document navigation is automatically generated based on the HTML title (h1-h6) tag", | ||
@@ -46,2 +46,5 @@ "main": "lib/index.js", | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"keywords": [ | ||
@@ -48,0 +51,0 @@ "rsuite", |
@@ -120,3 +120,3 @@ // @flow | ||
} | ||
this.scrollListener = () => { | ||
this.scrollListener = throttle(() => { | ||
let index = 0; | ||
@@ -150,4 +150,4 @@ const { activeAnchor } = this.state; | ||
} | ||
}; | ||
window.addEventListener('scroll', throttle(this.scrollListener, 300)); | ||
}, 300); | ||
window.addEventListener('scroll',this.scrollListener); | ||
} | ||
@@ -154,0 +154,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54487