@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.
- package/dist/index.js +8 -1
- 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
|
-
|
|
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 ?? []),
|