TCB Dialog Update
The CmsDialogUpdateComponent is designed to handle updating existing entities within a modal dialog. It integrates with the CmsService to fetch the entity's current data, build dynamic forms for updates, and submit changes.
This component is flexible and supports features like dynamic form generation, null value removal, and FormData transformations, making it highly extensible for various use cases.
How to use the component in your app :
import the component :
import {CmsDialogUpdateComponent} from '@tradinos/cms-frontend-entity';The selector for component , like it :
<lib-cms-dialog-update></lib-cms-dialog-update>Features
Dynamic Form Building:
Integrates with
GenericFormBuilderComponentto generate forms based on a schema.
Data Fetching:
Optionally fetches the entity's data for pre-filling the form.
Data Transformation:
Removes null values or converts data to
FormDatabefore submission, based on the schema configuration.
Dialog Management:
Opens and closes the update dialog, optionally returning the updated entity.
Extensibility:
Works seamlessly with the
CmsServicefor API interactions and data handling.
Dynamic Properties
These properties are dynamically set based on the passed configuration:
Property
Type
Description
Set By
item
T
The entity's data, either fetched dynamically or passed directly through config.data.item.
Dialog config or API
loading
boolean
Indicates whether the entity's data is still loading.
Internal Logic
genericFormBuilder
GenericFormBuilderComponent<T>
A dynamically built form instance tied to the entity's data.
Component Reference
Last updated