@tellescope/react-components 1.185.0 → 1.185.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.185.0",
3
+ "version": "1.185.1",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -47,13 +47,13 @@
47
47
  "@reduxjs/toolkit": "^1.6.2",
48
48
  "@stripe/react-stripe-js": "^2.9.0",
49
49
  "@stripe/stripe-js": "^1.52.1",
50
- "@tellescope/constants": "^1.185.0",
51
- "@tellescope/sdk": "^1.185.0",
52
- "@tellescope/types-client": "^1.185.0",
53
- "@tellescope/types-models": "^1.185.0",
54
- "@tellescope/types-utilities": "^1.185.0",
55
- "@tellescope/utilities": "^1.185.0",
56
- "@tellescope/validation": "^1.185.0",
50
+ "@tellescope/constants": "^1.185.1",
51
+ "@tellescope/sdk": "^1.185.1",
52
+ "@tellescope/types-client": "^1.185.1",
53
+ "@tellescope/types-models": "^1.185.1",
54
+ "@tellescope/types-utilities": "^1.185.1",
55
+ "@tellescope/utilities": "^1.185.1",
56
+ "@tellescope/validation": "^1.185.1",
57
57
  "@typescript-eslint/eslint-plugin": "^4.33.0",
58
58
  "@typescript-eslint/parser": "^4.33.0",
59
59
  "css-to-react-native": "^3.0.0",
@@ -84,7 +84,7 @@
84
84
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
85
85
  "react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
86
86
  },
87
- "gitHead": "cfec3c3b78a63582657d3fbf942cdbe2a0375f22",
87
+ "gitHead": "76ab045b222f3d87a67ed3d71ceb56044545a6d3",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  }
package/src/state.tsx CHANGED
@@ -2936,6 +2936,15 @@ export const useCalendarEventsForUser = (options={} as HookOptions<CalendarEvent
2936
2936
  if (!loaded) { break }
2937
2937
  if (loaded.length === 0) { break }
2938
2938
 
2939
+ if (options?.limit && loaded.length < options?.limit) {
2940
+ break;
2941
+ }
2942
+
2943
+ // default limit on backend is 500 per user included, so this is a very safe default
2944
+ if (!options?.limit && loaded.length < 100) {
2945
+ break;
2946
+ }
2947
+
2939
2948
  if (loaded.find(e => new Date(e.startTimeInMS).getTime() > to.getTime())) {
2940
2949
  break
2941
2950
  }
package/src/table.tsx CHANGED
@@ -626,6 +626,7 @@ export const TableFooterNumbered = <T,>({ horizontalPadding, loadMore, loadMoreO
626
626
  useEffect(() => {
627
627
  if (!(loadMore && doneLoading)) return
628
628
  if (doneLoading()) return
629
+ if (previousDisabled) return // return if on the first page
629
630
  if (!nextDisabled) return // return if not on last page
630
631
 
631
632
  loadMore(loadMoreOptions)