@cosmicdrift/kumiko-renderer 0.176.0 → 0.176.2

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": "@cosmicdrift/kumiko-renderer",
3
- "version": "0.176.0",
3
+ "version": "0.176.2",
4
4
  "description": "Platform-agnostic React renderer for Kumiko screens. Contains the shared logic — primitives-contract, hooks, KumikoScreen, navigation & SSE abstractions — that any platform-specific renderer (web, native) composes. No DOM, no EventSource, no react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -15,8 +15,8 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@cosmicdrift/kumiko-framework": "0.176.0",
19
- "@cosmicdrift/kumiko-headless": "0.176.0",
18
+ "@cosmicdrift/kumiko-framework": "0.176.2",
19
+ "@cosmicdrift/kumiko-headless": "0.176.2",
20
20
  "react": "^19.2.6",
21
21
  "temporal-polyfill": "^0.3.2"
22
22
  },
@@ -21,7 +21,7 @@ import type { FeatureSchema } from "../feature-schema";
21
21
  import { KumikoScreen } from "../kumiko-screen";
22
22
  import { NavProvider } from "../nav";
23
23
 
24
- const captured: Record<string, InputProps> = {};
24
+ const captured: Record<string, InputProps | undefined> = {};
25
25
  const captureInput: ComponentType<InputProps> = (props) => {
26
26
  captured[props.name] = props;
27
27
  return null;
@@ -85,10 +85,10 @@ function buildSchema(): FeatureSchema {
85
85
  } as FeatureSchema;
86
86
  }
87
87
 
88
- describe("EntityEditCreateBody — navigate-params als initial values (#1680)", () => {
89
- test("URL-searchParams aus rowAction navigate füllen das Create-Form vor", () => {
90
- captured["name"] = undefined as unknown as InputProps;
91
- captured["floorCount"] = undefined as unknown as InputProps;
88
+ describe("EntityEditCreateBody — navigate params as initial values (#1680)", () => {
89
+ test("URL searchParams from rowAction navigate prefill the create form", () => {
90
+ delete captured["name"];
91
+ delete captured["floorCount"];
92
92
  render(
93
93
  <LocaleProvider resolver={createStaticLocaleResolver({ locale: "de-DE" })}>
94
94
  <DispatcherProvider dispatcher={stubDispatcher()}>
@@ -114,8 +114,8 @@ describe("EntityEditCreateBody — navigate-params als initial values (#1680)",
114
114
  expect(captured["floorCount"]?.value).toBe(3);
115
115
  });
116
116
 
117
- test("ohne matching searchParam bleibt der Field-Default (leer)", () => {
118
- captured["name"] = undefined as unknown as InputProps;
117
+ test("without a matching searchParam the field keeps its default (empty)", () => {
118
+ delete captured["name"];
119
119
  render(
120
120
  <LocaleProvider resolver={createStaticLocaleResolver({ locale: "de-DE" })}>
121
121
  <DispatcherProvider dispatcher={stubDispatcher()}>
@@ -168,7 +168,14 @@ function ReferenceInput({
168
168
  const handleCreated = useCallback(
169
169
  (newId: string | undefined) => {
170
170
  setCreateOpen(false);
171
- void queryResult.refetch();
171
+ // Clear the search filter before refetching — the just-created record
172
+ // won't match whatever the user had typed pre-create, and would then
173
+ // be missing from `options` (shown as a raw id instead of a label).
174
+ setSearchTerm("");
175
+ queryResult.refetch().catch((err: unknown) => {
176
+ // biome-ignore lint/suspicious/noConsole: no error-surfacing path exists in this widget yet — at minimum, don't swallow it silently.
177
+ console.error("render-field: refetch after create failed", err);
178
+ });
172
179
  if (newId === undefined) {
173
180
  // Record was created server-side but the payload carried no id —
174
181
  // can't auto-select it, surface that instead of failing silently.