gd-sprest-bs 10.5.8 → 10.5.9

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.
@@ -21,6 +21,7 @@ var _SPFxWebPart = /** @class */ (function () {
21
21
  /** The configuration modal. */
22
22
  // Constructor
23
23
  function _SPFxWebPart(props) {
24
+ var _this = this;
24
25
  this._props = null;
25
26
  /** The webpart configuration */
26
27
  this._cfg = null;
@@ -63,16 +64,19 @@ var _SPFxWebPart = /** @class */ (function () {
63
64
  // Set the flag
64
65
  this._isDisplay = !this._isEdit;
65
66
  }
66
- // See if we are in edit mode
67
- if (this._isEdit) {
68
- // Render the configuration button
69
- this.renderEdit();
70
- }
71
- // See if we are in display mode
72
- if (this.IsDisplay) {
73
- // Render the webpart
74
- this.render();
75
- }
67
+ // Run the render method in another thread
68
+ setTimeout(function () {
69
+ // See if we are in edit mode
70
+ if (_this._isEdit) {
71
+ // Render the configuration button
72
+ _this.renderEdit();
73
+ }
74
+ // See if we are in display mode
75
+ if (_this.IsDisplay) {
76
+ // Render the webpart
77
+ _this.render();
78
+ }
79
+ }, 10);
76
80
  }
77
81
  Object.defineProperty(_SPFxWebPart.prototype, "Configuration", {
78
82
  get: function () { return this._cfg; },
@@ -22,7 +22,7 @@ var SPFxListWebPart = function (wpProps) {
22
22
  var _ddl = null;
23
23
  var _loadFl = false;
24
24
  // Load the lists
25
- var loadLists = function () {
25
+ var loadLists = function (listId) {
26
26
  // Disable the dropdown
27
27
  _ddl.disable();
28
28
  // Get the web url
@@ -42,7 +42,7 @@ var SPFxListWebPart = function (wpProps) {
42
42
  data: list,
43
43
  text: list.Title,
44
44
  value: list.Id,
45
- isSelected: wp.Configuration ? wp.Configuration.ListId == list.Id : false
45
+ isSelected: listId == list.Id
46
46
  });
47
47
  }
48
48
  // Set the dropdown
@@ -87,7 +87,7 @@ var SPFxListWebPart = function (wpProps) {
87
87
  btnProps: {
88
88
  text: "Load Lists",
89
89
  type: gd_bs_1.Components.ButtonTypes.OutlinePrimary,
90
- onClick: loadLists
90
+ onClick: function () { loadLists(); }
91
91
  }
92
92
  });
93
93
  // Return the properties
@@ -98,7 +98,7 @@ var SPFxListWebPart = function (wpProps) {
98
98
  // See if the lists haven't been loaded
99
99
  if (_loadFl == false) {
100
100
  // Load the lists
101
- loadLists();
101
+ loadLists(wp.Configuration ? wp.Configuration.ListId : null);
102
102
  }
103
103
  },
104
104
  // The configuration saving event