Skip to Content
FrontendBundlesCRUDDetail / ShowGeneral Details

General Details

GeneralDetails renders the primary information panel on entity show pages. It displays field values from the entity in a structured key-value layout, driven by entity column metadata.


Import

import { GeneralDetails } from "@phpcreation/frontend-crud-react-nextjs-bundle/components/GeneralDetails";

How It Works

Reads entity data from DetailShowContext and renders fields configured with showInDetail: true. Each field value is formatted according to its columnTypeEnum.

Column TypeDisplay Format
TEXTPlain text
BOOLEANBadge (Active/Inactive)
DATEFormatted date string
SELECTLabel from option
MANY_TO_MANYComma-separated labels
COLORColor swatch
TEXT_EDITORRendered HTML

Priority position

When the show-page config maps fields to the priorityBefore, priorityCurrent, and priorityAfter entities, the section shows where the entity sits in the priority order. The neighbors are fetched with usePriorityNeighbors, and a list icon in the section header links to the priority-sorted listing anchored to this entity (?order[priority]=asc&anchor=<id>).

General details showing priority before, current, and after values with the listing link icon

Tree entities

For entities with nested-set fields, the raw tree keys (lvl, lft, rgt, root, fullParentTree) are hidden from this section. Tree Position renders them instead.


Usage

import { DetailShowContext } from "..."; import { GeneralDetails } from "..."; <DetailShowContext entityConfig={entityConfig} id={entityId}> <GeneralDetails fields={entityDetailFields} /> </DetailShowContext>;

Props

PropTypeDescription
fieldsFieldConfig[]Fields to display
layout"grid" | "list"Layout mode (default: "grid")
columnsnumberGrid columns (default: 2)
classNamestringAdditional CSS classes

Last updated on