mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +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";
|
||||
|
||||
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
|
||||
| Record<string, unknown>
|
||||
| undefined;
|
||||
|
||||
// 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 { t } = useTranslation([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user