Skip to main content

EditResourceProps

Props for EditResource

Properties

config?

optional config: EditResourceConfig

Configuration for the EditResource component


defaultTab?

optional defaultTab: TabsName

Default active tab


hasId?

optional hasId: boolean

Indicates whether the resource has an id (if omitted, it is derived via isUuidSet(resourceId))


isNew?

optional isNew: boolean

Indicates if this form is for creating a new resource


onCancelClick?

optional onCancelClick: VoidFuncNoParam

Event handler called when the cancel button is clicked


onDeleteComplete?

optional onDeleteComplete: VoidFuncNoParam

Event handler called when resource is successfully deleted


onLoadComplete?

optional onLoadComplete: VoidFuncNoParam

Event handler called when resource loading completes


onPropertyUpdateComplete?

optional onPropertyUpdateComplete: VoidFuncNoParam

Event handler called when the updated property data has been saved


onRefreshResource?

optional onRefreshResource: VoidFuncNoParam

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


onSaveClick()?

optional onSaveClick: (v) => void

Event handler called when the resource is saved, receiving the saved resource object with all form values, but with an empty Uuid in the id field

Parameters

v

WithId

Returns

void


onSaveComplete()?

optional onSaveComplete: (v, r) => void

Event handler called when resource is successfully saved

Parameters

v

boolean

r

string

Returns

void


onSavingEnding?

optional onSavingEnding: VoidFuncNoParam

Event handler called when a saving process completes


onSavingStarting?

optional onSavingStarting: VoidFuncNoParam

Event handler called when a new saving process is initiated


ref?

optional ref: Ref<EditResourceHandle>

Ref exposing save / getAllFormValues methods (same as before)


relatedResourceId?

optional relatedResourceId: string

Uuid value of the related resource that will be automatically filled in the field specified by relatedResourceName


relatedResourceName?

optional relatedResourceName: string

Name of the field that should be automatically filled with the related resource's Uuid when creating a related resource


resource?

optional resource: WithId

Pre-loaded resource data (if not provided, will be loaded using resourceId)


resourceId?

optional resourceId: string

Unique identifier for the resource being edited, or an empty Uuid when creating a new resource


setIsFormValid()?

optional setIsFormValid: (v) => void

Callback function that allows parent components to receive form validity state updates

Parameters

v

boolean

Returns

void


uiResourceMeta

uiResourceMeta: UiResourceMeta

Complete Ui metadata definition for the resource that provides structural information and rendering rules