@stoker-platform/web-app 0.5.147 → 0.5.148

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.148
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: add isMobile to data retrieval function dependency arrays
8
+
3
9
  ## 0.5.147
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.147",
3
+ "version": "0.5.148",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Filters.tsx CHANGED
@@ -335,7 +335,7 @@ export function Filters({ collection, excluded, relationList }: FiltersProps) {
335
335
  }))
336
336
  })
337
337
  },
338
- [],
338
+ [isMobile],
339
339
  )
340
340
 
341
341
  const debounceTimeout = useRef<NodeJS.Timeout>()
package/src/Form.tsx CHANGED
@@ -1926,6 +1926,8 @@ function RelationField({
1926
1926
  initialize()
1927
1927
  }, [])
1928
1928
 
1929
+ const isMobile = useIsMobile()
1930
+
1929
1931
  const getData = useCallback(
1930
1932
  async (query: string | undefined, constraints: [string, "==" | "in", unknown][] = []) => {
1931
1933
  setIsLoadingImmediate(true)
@@ -2052,7 +2054,7 @@ function RelationField({
2052
2054
  setIsLoading(false)
2053
2055
  })
2054
2056
  },
2055
- [record, form],
2057
+ [record, form, isMobile],
2056
2058
  )
2057
2059
 
2058
2060
  const handleOneToChange = useCallback(
@@ -2114,7 +2116,6 @@ function RelationField({
2114
2116
  popoverHeight = "h-48"
2115
2117
  }
2116
2118
 
2117
- const isMobile = useIsMobile()
2118
2119
  const { offset: keyboardOffset, viewportHeight } = useKeyboardOffset(isMobile && isOpen)
2119
2120
  const sheetHeight = Math.max(240, Math.min(viewportHeight - 16, viewportHeight * 0.9))
2120
2121
 
@@ -74,6 +74,8 @@ export const PermissionPicker = ({
74
74
 
75
75
  const pickerDebounceTimeout = useRef<NodeJS.Timeout>()
76
76
 
77
+ const isMobile = useIsMobile()
78
+
77
79
  const getData = useCallback(
78
80
  async (query: string | undefined, constraints: [string, "==" | "in", unknown][] = []) => {
79
81
  setIsLoadingImmediate(true)
@@ -149,7 +151,7 @@ export const PermissionPicker = ({
149
151
  setIsLoading(false)
150
152
  })
151
153
  },
152
- [],
154
+ [isMobile],
153
155
  )
154
156
 
155
157
  const debounceTimeout = useRef<NodeJS.Timeout>()
@@ -334,7 +336,6 @@ export const PermissionPicker = ({
334
336
  popoverHeight = "h-48"
335
337
  }
336
338
 
337
- const isMobile = useIsMobile()
338
339
  const { offset: keyboardOffset, viewportHeight } = useKeyboardOffset(isMobile && isOpen)
339
340
  const sheetHeight = Math.max(240, Math.min(viewportHeight - 16, viewportHeight * 0.9))
340
341