feat: expose form semantic documentation subjects
Module Package Release / publish-packages (push) Successful in 12s

This commit is contained in:
2026-08-21 15:44:42 +02:00
parent 5bc651a8e7
commit b9132d076d
9 changed files with 959 additions and 13 deletions
+13
View File
@@ -1,5 +1,6 @@
import { Download, Pencil, Plus, Search, Upload } from "lucide-react";
import { useCallback, useEffect, useRef, useState, type FormEvent } from "react";
import { useSearchParams } from "react-router";
import { ActionBlockerHint,
Button,
Dialog,
@@ -32,6 +33,7 @@ import { FORMS_DOCUMENTATION, FORMS_FIELD_DOCUMENTATION, FORMS_I18N } from "./in
export default function FormsPage({ settings, auth }: PlatformRouteContext) {
const [searchParams, setSearchParams] = useSearchParams();
const [query, setQuery] = useState("");
const [submittedQuery, setSubmittedQuery] = useState("");
const [state, setState] = useState("");
@@ -75,6 +77,17 @@ export default function FormsPage({ settings, auth }: PlatformRouteContext) {
return () => controller.abort();
}, [load]);
useEffect(() => {
const formId = searchParams.get("formId");
if (!formId || editing || loading) return;
const requested = items.find((item) => item.reference.object_id === formId);
if (!requested) return;
setEditing(requested);
const next = new URLSearchParams(searchParams);
next.delete("formId");
setSearchParams(next, { replace: true });
}, [editing, items, loading, searchParams, setSearchParams]);
function search(event: FormEvent) {
event.preventDefault();
setSubmittedQuery(query.trim());