Skip to main content

ViewProps

Props for the View component.

Properties

config?

optional config: EditResourceConfig

Configuration object for customizing the view behavior


defaultTab?

optional defaultTab: TabsName

The default tab to display when the view opens


onCancelClick?

optional onCancelClick: VoidFuncNoParam

Event handler called when cancel action is triggered


onDeleteComplete?

optional onDeleteComplete: VoidFuncNoParam

Event handler called when deletion is completed


onRefreshItem?

optional onRefreshItem: VoidFuncNoParam

Event handler called when refreshing data display (e.g., updating tables/lists after creating or updating a resource)


onSaveComplete()?

optional onSaveComplete: (v, r) => void

Event handler called when save operation is completed. First param - boolean value that indicates if sheet should close. Second param is resource id

Parameters

v

boolean

r

string

Returns

void


resourceId?

optional resourceId: string

The id of the resource to display


resourceName?

optional resourceName: string

The name of the resource to display


resources?

optional resources: WithId[] | Promise<WithId[]>

A promise that resolves to an array of resources to be displayed in the ResourceList's Table. Can be added to increase the performance of the component. This is useful when the resources are fetched from an API or database and you want to avoid fetching them again when the view is rendered.


uiResourceMetas?

optional uiResourceMetas: UiResourceMeta[] | Promise<UiResourceMeta[]>

Metadata about the item being displayed can be added to increase the performance of the component and metadata about related resources that can be displayed in the view. Can be added to increase the performance of the component.


viewName?

optional viewName: string

The name identifier for the view type