@nivaro/react 0.1.24 → 0.1.25

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -18428,7 +18428,14 @@ function ItemEditForm({
18428
18428
  queryKey: ["field-config", e, P],
18429
18429
  queryFn: () => q.request(get$1(`/field-config/${e}`, P ? { layout_id: String(P) } : void 0)).then(($) => $.data ?? []),
18430
18430
  staleTime: 6e4,
18431
- enabled: !s || L !== void 0
18431
+ // Wait for the layout either way, not just when a slug pins one. Without
18432
+ // this the field config fetched immediately with layoutId = null — the
18433
+ // LAYOUT-LESS default field set — painted that, then refetched under a new
18434
+ // key once the layout arrived: a visible flash of the wrong form on the
18435
+ // way to the right one. `catch(() => null)` on the layout query means it
18436
+ // always settles, so this cannot hang; undefined is strictly "still
18437
+ // asking".
18438
+ enabled: L !== void 0
18432
18439
  }), { data: U = [], isFetched: xe } = useQuery({
18433
18440
  queryKey: ["relations", e],
18434
18441
  queryFn: () => q.request(get$1(`/data-model/relations/for/${e}`)).then(($) => $.data ?? []),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",