gd-sprest-bs 10.5.0 → 10.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -64,8 +64,8 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
64
64
|
targetProperty: "configuration",
|
|
65
65
|
type: gd_sprest_1.SPTypes.PropertyPaneType.Button,
|
|
66
66
|
onClick: function () {
|
|
67
|
-
//
|
|
68
|
-
_this.
|
|
67
|
+
// Call the click event
|
|
68
|
+
_this.editButtonClick();
|
|
69
69
|
}
|
|
70
70
|
}]
|
|
71
71
|
}
|
|
@@ -112,6 +112,13 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
112
112
|
enumerable: false,
|
|
113
113
|
configurable: true
|
|
114
114
|
});
|
|
115
|
+
// The click event for the button
|
|
116
|
+
_SPFxWebPart.prototype.editButtonClick = function () {
|
|
117
|
+
// Display the modal
|
|
118
|
+
this._modal.show();
|
|
119
|
+
// Hide the property pane
|
|
120
|
+
this._props.spfx.context.propertyPane.close();
|
|
121
|
+
};
|
|
115
122
|
// Method to render the webpart
|
|
116
123
|
_SPFxWebPart.prototype.render = function () {
|
|
117
124
|
// Call the render event
|
|
@@ -125,10 +132,8 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
125
132
|
el: this._props.spfx.domElement,
|
|
126
133
|
text: "Edit",
|
|
127
134
|
onClick: function () {
|
|
128
|
-
//
|
|
129
|
-
_this.
|
|
130
|
-
// Hide the property pane
|
|
131
|
-
_this._props.spfx.context.propertyPane.close();
|
|
135
|
+
// Call the click event
|
|
136
|
+
_this.editButtonClick();
|
|
132
137
|
}
|
|
133
138
|
});
|
|
134
139
|
// Create the modal props
|
|
@@ -168,6 +173,7 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
168
173
|
catch (_a) { }
|
|
169
174
|
// Save the configuration
|
|
170
175
|
_this._props.spfxSaveConfig ? _this._props.spfxSaveConfig(wpCfg) : null;
|
|
176
|
+
_this._props.spfx.properties.configuration = wpCfg;
|
|
171
177
|
// Call the saved event
|
|
172
178
|
_this._props.onConfigSaved ? _this._props.onConfigSaved(cfg) : null;
|
|
173
179
|
}
|