@salesforce/webapp-template-feature-react-global-search-experimental 1.109.2 → 1.109.4

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/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.109.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.109.3...v1.109.4) (2026-03-19)
7
+
8
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.109.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.109.2...v1.109.3) (2026-03-19)
15
+
16
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.109.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.109.1...v1.109.2) (2026-03-18)
7
23
 
8
24
  **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
@@ -15,8 +15,8 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/sdk-data": "^1.109.2",
19
- "@salesforce/webapp-experimental": "^1.109.2",
18
+ "@salesforce/sdk-data": "^1.109.4",
19
+ "@salesforce/webapp-experimental": "^1.109.4",
20
20
  "@tailwindcss/vite": "^4.1.17",
21
21
  "@tanstack/react-form": "^1.28.5",
22
22
  "class-variance-authority": "^0.7.1",
@@ -42,7 +42,7 @@
42
42
  "@graphql-eslint/eslint-plugin": "^4.1.0",
43
43
  "@graphql-tools/utils": "^11.0.0",
44
44
  "@playwright/test": "^1.49.0",
45
- "@salesforce/vite-plugin-webapp-experimental": "^1.109.2",
45
+ "@salesforce/vite-plugin-webapp-experimental": "^1.109.4",
46
46
  "@testing-library/jest-dom": "^6.6.3",
47
47
  "@testing-library/react": "^16.1.0",
48
48
  "@testing-library/user-event": "^14.5.2",
@@ -30,17 +30,24 @@ export function useObjectInfoBatch(objectApiNames: string[]): UseObjectInfoBatch
30
30
  error: null,
31
31
  });
32
32
  const isCancelled = useRef(false);
33
+ // Derive a stable primitive from the array so the effect dependency doesn't
34
+ // change on every render. A new array reference (even with identical contents)
35
+ // would otherwise trigger the effect on every render, causing an infinite loop.
36
+ const namesKey = objectApiNames.filter(Boolean).join(",");
33
37
 
34
38
  useEffect(() => {
35
39
  isCancelled.current = false;
36
- const names = objectApiNames.filter(Boolean);
40
+ // Re-derive the array inside the effect from the stable key rather than
41
+ // closing over objectApiNames directly, which would require it in the dep
42
+ // array and reintroduce the infinite loop.
43
+ const names = namesKey ? namesKey.split(",") : [];
37
44
  if (names.length === 0) {
38
45
  queueMicrotask(() => setState({ objectInfos: [], loading: false, error: null }));
39
46
  return;
40
47
  }
41
48
  queueMicrotask(() => setState((s) => ({ ...s, loading: true, error: null })));
42
49
  objectInfoService
43
- .getObjectInfoBatch(names.join(","))
50
+ .getObjectInfoBatch(namesKey)
44
51
  .then((res) => {
45
52
  if (isCancelled.current) return;
46
53
  const objectInfos = names
@@ -59,7 +66,7 @@ export function useObjectInfoBatch(objectApiNames: string[]): UseObjectInfoBatch
59
66
  return () => {
60
67
  isCancelled.current = true;
61
68
  };
62
- }, [objectApiNames]);
69
+ }, [namesKey]);
63
70
 
64
71
  return state;
65
72
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.109.2",
3
+ "version": "1.109.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
9
- "version": "1.109.2",
9
+ "version": "1.109.4",
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "devDependencies": {
12
12
  "@lwc/eslint-plugin-lwc": "^3.3.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.109.2",
3
+ "version": "1.109.4",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-feature-react-global-search-experimental",
3
- "version": "1.109.2",
3
+ "version": "1.109.4",
4
4
  "description": "Global search feature for Salesforce objects with filtering and pagination",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -30,17 +30,24 @@ export function useObjectInfoBatch(objectApiNames: string[]): UseObjectInfoBatch
30
30
  error: null,
31
31
  });
32
32
  const isCancelled = useRef(false);
33
+ // Derive a stable primitive from the array so the effect dependency doesn't
34
+ // change on every render. A new array reference (even with identical contents)
35
+ // would otherwise trigger the effect on every render, causing an infinite loop.
36
+ const namesKey = objectApiNames.filter(Boolean).join(",");
33
37
 
34
38
  useEffect(() => {
35
39
  isCancelled.current = false;
36
- const names = objectApiNames.filter(Boolean);
40
+ // Re-derive the array inside the effect from the stable key rather than
41
+ // closing over objectApiNames directly, which would require it in the dep
42
+ // array and reintroduce the infinite loop.
43
+ const names = namesKey ? namesKey.split(",") : [];
37
44
  if (names.length === 0) {
38
45
  queueMicrotask(() => setState({ objectInfos: [], loading: false, error: null }));
39
46
  return;
40
47
  }
41
48
  queueMicrotask(() => setState((s) => ({ ...s, loading: true, error: null })));
42
49
  objectInfoService
43
- .getObjectInfoBatch(names.join(","))
50
+ .getObjectInfoBatch(namesKey)
44
51
  .then((res) => {
45
52
  if (isCancelled.current) return;
46
53
  const objectInfos = names
@@ -59,7 +66,7 @@ export function useObjectInfoBatch(objectApiNames: string[]): UseObjectInfoBatch
59
66
  return () => {
60
67
  isCancelled.current = true;
61
68
  };
62
- }, [objectApiNames]);
69
+ }, [namesKey]);
63
70
 
64
71
  return state;
65
72
  }