cogsbox-state 0.5.384 → 0.5.386

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-state",
3
- "version": "0.5.384",
3
+ "version": "0.5.386",
4
4
  "description": "React state management library with form controls and server sync",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/CogsState.tsx CHANGED
@@ -2015,11 +2015,15 @@ function createProxyHandler<T>(
2015
2015
  if (isAtBottom) {
2016
2016
  // If we scroll back to the bottom, re-lock.
2017
2017
  if (status !== "LOCKED_AT_BOTTOM") {
2018
+ console.log("OCKED_AT_BOTTOM");
2019
+ shouldNotScroll.current = false;
2018
2020
  setStatus("LOCKED_AT_BOTTOM");
2019
2021
  }
2020
2022
  } else {
2021
2023
  // If we have scrolled up, unlock from the bottom.
2022
2024
  if (status !== "IDLE_NOT_AT_BOTTOM") {
2025
+ console.log("Scrolled up -> IDLE_NOT_AT_BOTTOM");
2026
+ shouldNotScroll.current = true;
2023
2027
  setStatus("IDLE_NOT_AT_BOTTOM");
2024
2028
  }
2025
2029
  }