s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Svelte · Screens

DetailScreen

No summary has been written for DetailScreen. Everything below is generated from the declaration shipped in 0.57.40 and describes the real contract.

Public export

typescript
import { DetailScreen } from '@happyvertical/smrt-svelte/screens';
Import path
@happyvertical/smrt-svelte/screens
Props
21
Props described
16 of 21
Bindable state
0
Callback events
3
Verified release
0.57.40

Props

NameTypeRequiredDescription
definitionScreenCollectionDefinitionYesNot described
policyScreenPolicy | nullNoResolved field policy for the same object; omit for the code seed.
recordScreenRecordYesNot described
titlestringNoPage title. Defaults to the first basic text field, else the class name.
fieldsreadonly string[]NoExplicit field names, in order (overrides the derived set).
currencystringNoISO 4217 code used by money fields.
localestringNoBCP-47 locale for number and date formatting.
showHeaderbooleanNoNot described
backLabelstringNoLabel for the back action; defaults to the pluralized class name.
deletingbooleanNoMutation in flight; locks the delete confirmation.
onback() => voidNoNot described
onedit() => voidNoNot described
ondelete() => void | Promise<void>NoWhen set, a Delete action with a confirmation is offered.
extraActionsSnippetNoExtra header actions, rendered before Edit and Delete.
childrenSnippetNoExtra content under the fields.
relationsreadonly ScreenRelation[]NoRelations of this model (`deriveScreenRelations`). The `reference` ones map a FK field to its target model, which `labels` is keyed by.
hrefFor(field: ScreenField, id: string) => string | undefinedNoLink for a reference field's value; `undefined` renders no link.
labelsReadonly<Record<string, (id: string) => string | undefined>>NoDisplay label for a referenced record, keyed by target model id (`relation.model`); `undefined` falls back to the raw id.
excludereadonly string[]NoField names to leave out (the record header shows them).
hideEmptybooleanNoMove fields with no value behind a "Show empty fields" disclosure instead of listing "Not set" cells.
variant'plain' | 'card'No`card`: the fields sit in a bordered card (the record page's details card).

Bindable state

This component has no bindable public state.

Callback events

  • onback() => void
  • onedit() => void
  • ondelete() => void | Promise<void>

Examples and explanation