Additional Information
AdditionalInformationSection renders the custom properties panel on entity show/detail pages. It reads the customPropertiesListing URL from the entity data (via DetailShowContext) to fetch property definitions, then displays the entity’s custom property values.
Import
import { AdditionalInformationSection } from "@phpcreation/frontend-crud-react-nextjs-bundle/components/AdditionalInformationSection";How It Works
- Entity API response includes a
customPropertiesListingURL AdditionalInformationSectionfetches property definitions from that URL- Definitions are matched against the entity’s
customPropertiesvalues - Each property is rendered as a key-value row
API Response Structure
{
"id": 1,
"name": "Acme Corp",
"customProperties": {
"industry": "Technology",
"accountManager": "Jane Doe"
},
"customPropertiesListing": "https://api.example.com/custom-properties?entity=Account"
}Usage
import { DetailShowContext } from "...";
import { AdditionalInformationSection } from "...";
<DetailShowContext entityConfig={entityConfig} id={id}>
<AdditionalInformationSection />
</DetailShowContext>The component reads data.customPropertiesListing from DetailShowContext automatically. No props are required.
AdditionalInformationSection is the show page counterpart of CustomPropertiesFormSection. The form section handles input; the additional information section handles display.
Related
Last updated on