mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-19 22:58:22 +03:00
remove collapsible around root section
This commit is contained in:
parent
bc5d7cf575
commit
de6ad5a32a
@ -13,13 +13,17 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
|
export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
|
||||||
const { title, description, properties, uiSchema } = props;
|
const { title, description, properties, uiSchema, registry, schema } = props;
|
||||||
|
const { idSchema } = props as ObjectFieldTemplateProps & {
|
||||||
|
idSchema?: { $id?: string };
|
||||||
|
};
|
||||||
const formContext = (props as Record<string, unknown>).formContext as
|
const formContext = (props as Record<string, unknown>).formContext as
|
||||||
| Record<string, unknown>
|
| Record<string, unknown>
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
// Check if this is a root-level object
|
// Check if this is a root-level object
|
||||||
const isRoot = !title;
|
const isRoot = idSchema?.$id === "root" || registry?.rootSchema === schema;
|
||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(true);
|
const [isOpen, setIsOpen] = useState(true);
|
||||||
|
|
||||||
const { t } = useTranslation([
|
const { t } = useTranslation([
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user