gd-sprest-bs 10.9.6 → 10.9.7
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.
- package/build/components/listForm/index.js +12 -18
- package/dist/gd-sprest-bs-icons.js +1 -1
- package/dist/gd-sprest-bs-icons.min.js +1 -1
- package/dist/gd-sprest-bs.d.ts +2 -1
- package/dist/gd-sprest-bs.js +1 -1
- package/dist/gd-sprest-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/field/types.d.ts +2 -1
- package/src/components/listForm/index.ts +1 -4
|
@@ -746,20 +746,20 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
746
746
|
};
|
|
747
747
|
// Parse the fields to render
|
|
748
748
|
var fieldNames = getFieldsToRender(props);
|
|
749
|
-
var
|
|
749
|
+
for (var i = 0; i < fieldNames.length; i++) {
|
|
750
750
|
var fieldName = fieldNames[i];
|
|
751
751
|
var field = props.info.fields[fieldName];
|
|
752
752
|
// See if this is the attachment field
|
|
753
753
|
if (fieldName == "Attachments") {
|
|
754
754
|
// Generate the attachments row
|
|
755
755
|
generateAttachmentsRow();
|
|
756
|
-
|
|
756
|
+
continue;
|
|
757
757
|
}
|
|
758
758
|
// Ensure the field exists
|
|
759
759
|
if (field == null) {
|
|
760
760
|
// Log
|
|
761
761
|
console.error("[List Form] Field '" + fieldName + "' does not exist. Check the list or query.");
|
|
762
|
-
|
|
762
|
+
continue;
|
|
763
763
|
}
|
|
764
764
|
// See if the item exists
|
|
765
765
|
value[fieldName] = null;
|
|
@@ -781,43 +781,43 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
781
781
|
var controlMode = props.controlMode || (props.info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New);
|
|
782
782
|
// See if this is an edit form and we are hiding this field
|
|
783
783
|
if (controlMode == gd_sprest_1.SPTypes.ControlMode.Edit && field.SchemaXml.indexOf('ShowInEditForm="FALSE"') > 0) {
|
|
784
|
-
|
|
784
|
+
continue;
|
|
785
785
|
}
|
|
786
786
|
// See if this is a new form and we are hiding this field
|
|
787
787
|
if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.SchemaXml.indexOf('ShowInNewForm="FALSE"') > 0) {
|
|
788
|
-
|
|
788
|
+
continue;
|
|
789
789
|
}
|
|
790
790
|
// See if thi sis a new form and this is an associated lookup field
|
|
791
791
|
if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.IsDependentLookup) {
|
|
792
|
-
|
|
792
|
+
continue;
|
|
793
793
|
}
|
|
794
794
|
// See if this is a display form and we are hiding this field
|
|
795
795
|
if (controlMode == gd_sprest_1.SPTypes.ControlMode.Display && field.SchemaXml.indexOf('ShowInDisplayForm="FALSE"') > 0) {
|
|
796
|
-
|
|
796
|
+
continue;
|
|
797
797
|
}
|
|
798
798
|
// See if this is a read-only field
|
|
799
799
|
if (field.ReadOnlyField) {
|
|
800
800
|
// Do not render in the new form
|
|
801
801
|
if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {
|
|
802
|
-
|
|
802
|
+
continue;
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
// Do not render a hidden taxonomy field
|
|
806
806
|
if (field.Hidden && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note && /_0$/.test(field.Title)) {
|
|
807
|
-
|
|
807
|
+
continue;
|
|
808
808
|
}
|
|
809
809
|
// See if this is an invalid field type
|
|
810
810
|
if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Invalid) {
|
|
811
811
|
// Ensure it's not a taxonomy field
|
|
812
812
|
if (!/^TaxonomyFieldType/.test(field.TypeAsString)) {
|
|
813
|
-
|
|
813
|
+
continue;
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
// Else, see if this is a calculated column
|
|
817
817
|
else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Calculated) {
|
|
818
818
|
// Do not render in the new/edit forms
|
|
819
819
|
if (props.controlMode != gd_sprest_1.SPTypes.ControlMode.Display) {
|
|
820
|
-
|
|
820
|
+
continue;
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
// See if this is a lookup field
|
|
@@ -836,11 +836,8 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
836
836
|
controlMode: props.controlMode,
|
|
837
837
|
field: field,
|
|
838
838
|
listInfo: props.info,
|
|
839
|
+
lookupFilter: lookupFilter,
|
|
839
840
|
value: value[fieldName],
|
|
840
|
-
onControlRendering: function (control, field) {
|
|
841
|
-
// Set the lookup field filter
|
|
842
|
-
lookupFilter ? control.lookupFilter = lookupFilter : null;
|
|
843
|
-
},
|
|
844
841
|
onControlRendered: function (control, field) {
|
|
845
842
|
// Update the mapper
|
|
846
843
|
mapper[field.InternalName].control = control;
|
|
@@ -861,9 +858,6 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
861
858
|
control: fieldControl.controlProps
|
|
862
859
|
}]
|
|
863
860
|
});
|
|
864
|
-
};
|
|
865
|
-
for (var i = 0; i < fieldNames.length; i++) {
|
|
866
|
-
_loop_1(i);
|
|
867
861
|
}
|
|
868
862
|
// See if there is a template
|
|
869
863
|
if (props.template) {
|