Back to Website
Show / Hide Table of Contents

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>
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback