How to use the @microsoft/sp-lodash-subset.set function in @microsoft/sp-lodash-subset

To help you get started, we’ve selected a few @microsoft/sp-lodash-subset examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SharePoint / sp-dev-fx-property-controls / src / propertyFields / propertyEditor / PropertyPanePropertyEditorHost.tsx View on Github external
private onSave = (): void => {
        const newProperties = JSON.parse(this.state.propertiesJson);
        for (let propName in newProperties) {
            set(this.props.webpart.properties, propName, newProperties[propName]);
            if (typeof this.props.webpart.properties[propName].onChange !== 'undefined' && this.props.webpart.properties[propName].onChange !== null) {
                this.props.webpart.properties[propName].onChange(propName, newProperties[propName]);
            }
        }
        this.props.webpart.render();
        this.props.webpart.context.propertyPane.refresh();
        this.setState((current) => ({ ...current, openPanel: false }));
    }