Class UpdateSurfacesCommand
A command that replaces product pages. Here, we replace the first page of the loaded product with the third page of a state file.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"updateSurfaces": [{
"definition": "{{ $['options']._.props.id }}",
"surfaces": [0],
"newProductSurfaces": [2],
"replaceAll": true
}]
}
}
Package: ui-framework
Methods
execute(IUpdateSurfacesCommandDefinition[] | IUpdateSurfacesCommandDefinition)
Executes this command.
Declaration
function execute(params: IUpdateSurfacesCommandDefinition[] | IUpdateSurfacesCommandDefinition)
Parameters
Type | Name | Description |
---|---|---|
IUpdateSurfacesCommandDefinition[] | IUpdateSurfacesCommandDefinition | params |
Parameters for the command. |
Returns
Type | Description |
---|---|
Promise<void> |