Skip to Content

Quick Show

QuickShow opens a modal or side panel displaying an entity’s details without navigating to the full detail page.


Import

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

Usage

import { QuickShow } from "..."; function RowActions({ entity }) { const [open, setOpen] = useState(false); return ( <> <Button variant="ghost" onClick={() => setOpen(true)}>View</Button> <QuickShow open={open} onOpenChange={setOpen} entityId={entity.id} entityConfig={entityConfig} detailFields={entityDetailFields} /> </> ); }

Props

PropTypeDescription
openbooleanModal open state
onOpenChange(open: boolean) => voidOpen state handler
entityIdstring | numberEntity ID to fetch and display
entityConfigEntityConfigEntity configuration
detailFieldsFieldConfig[]Fields to display

Last updated on