oolib 2.30.0 → 2.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,8 @@ var useScroll = function (scrollFn, options) {
9
9
  scrollFn(); //run the scroll fn once before any scroll to set initial states
10
10
  var throttledScrollFn = (0, lodash_1.throttle)(scrollFn, 100);
11
11
  var fnToUse = options.noThrottle ? scrollFn : throttledScrollFn;
12
- window.addEventListener('scroll', fnToUse);
13
- return function () { return window.removeEventListener('scroll', fnToUse); };
12
+ window.addEventListener('scroll', fnToUse, true); // <-- why 'true' : https://stackoverflow.com/a/32954565
13
+ return function () { return window.removeEventListener('scroll', fnToUse, true); };
14
14
  }, [options.loading]);
15
15
  };
16
16
  exports.useScroll = useScroll;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.30.0",
3
+ "version": "2.30.1",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",