Search...
setProps( )
Sets the widget's properties. You can also assign a partial subset of the widget's properties.
Description
The setProps()
function returns a Promise that resolves when the properties are set. To use this function on an inner (nested) widget, use getNestedWidget()
.
Syntax
function setProps(props: Object): Promise<void>
setProps Parameters
NAME
TYPE
DESCRIPTION
props
Object
Object with some or all of the widget's properties.
Returns
Fulfilled - when the properties are set.
Return Type:
Promise<void>
Was this helpful?
Set a widget's properties
Copy Code
1import wixWidget from 'wix-widget';23// ...45wixWidget.setProps({saleIndicator: "No Sale"})6.then (() => {7 // Code to execture after setting the props8})