gd-sprest-bs 10.7.1 → 10.7.2

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.
@@ -208,11 +208,13 @@ var Field = function (props) {
208
208
  }
209
209
  // Get the items
210
210
  var items = getChoiceItems(displayRadioButtons, props.field, props.value);
211
- // Add a blank entry
212
- items = [{
213
- text: "",
214
- value: null
215
- }].concat(items);
211
+ // Add a blank entry if this is a dropdown
212
+ if (!displayRadioButtons) {
213
+ items = [{
214
+ text: "",
215
+ value: null
216
+ }].concat(items);
217
+ }
216
218
  // See if we are allowing custom values
217
219
  if (allowFillIn) {
218
220
  // Set the base validation
@@ -39,11 +39,7 @@ var SPFxListFormWebPart = function (wpProps) {
39
39
  var dispProps = {
40
40
  el: wpProps.spfx.domElement,
41
41
  info: info,
42
- rowClassName: "mb-3",
43
- onFormRendered: function (form) {
44
- // Remove the last class
45
- form.el.lastChild.classList.remove("mb-3");
46
- }
42
+ rowClassName: "mb-3"
47
43
  };
48
44
  // Call the rendering event
49
45
  dispProps = wpProps.onDisplayFormRendering ? wpProps.onDisplayFormRendering(dispProps) : dispProps;
@@ -57,12 +53,8 @@ var SPFxListFormWebPart = function (wpProps) {
57
53
  var editProps = {
58
54
  el: wpProps.spfx.domElement,
59
55
  info: info,
60
- rowClassName: "mb-3",
61
56
  controlMode: info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New,
62
- onFormRendered: function (form) {
63
- // Remove the last class
64
- form.el.lastChild.classList.remove("mb-3");
65
- }
57
+ rowClassName: "mb-3"
66
58
  };
67
59
  // Call the rendering event
68
60
  editProps = wpProps.onEditFormRendering ? wpProps.onEditFormRendering(editProps) : editProps;
@@ -239,12 +231,12 @@ var SPFxListFormWebPart = function (wpProps) {
239
231
  var item = values["ContentType"];
240
232
  // Clear the form component properties
241
233
  (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes(item.value).update({
242
- DisplayFormClientSideComponentId: null,
243
- DisplayFormClientSideComponentProperties: null,
244
- EditFormClientSideComponentId: null,
245
- EditFormClientSideComponentProperties: null,
246
- NewFormClientSideComponentId: null,
247
- NewFormClientSideComponentProperties: null
234
+ DisplayFormClientSideComponentId: "",
235
+ DisplayFormClientSideComponentProperties: "",
236
+ EditFormClientSideComponentId: "",
237
+ EditFormClientSideComponentProperties: "",
238
+ NewFormClientSideComponentId: "",
239
+ NewFormClientSideComponentProperties: ""
248
240
  }).execute(function () {
249
241
  // Close the modal
250
242
  modal.hide();