Skip to content

Commit 289b059

Browse files
Merge branch 'master' of https://github.com/pnp/sp-dev-fx-controls-react into dev
2 parents 3d7c7de + 8893c3c commit 289b059

File tree

5 files changed

+50
-19
lines changed

5 files changed

+50
-19
lines changed

CHANGELOG.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@
2828
"[wuxiaojun514](https://github.com/wuxiaojun514)"
2929
]
3030
},
31+
{
32+
"version": "3.16.2",
33+
"changes": {
34+
"fixes": [
35+
"`DynamicForm`: Fixing the previous version's issue [#1736](https://github.com/pnp/sp-dev-fx-controls-react/pull/1736) (introduced in [#1718](https://github.com/pnp/sp-dev-fx-controls-react/pull/1718))"
36+
]
37+
},
38+
"contributions": [
39+
"[IRRDC](https://github.com/IRRDC)"
40+
]
41+
},
3142
{
3243
"version": "3.16.1",
3344
"changes": {

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121

2222
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Lars Fernhomberg](https://github.com/lafe), [Mark Bice](https://github.com/mbice), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Tom G](https://github.com/t0mgerman), [wuxiaojun514](https://github.com/wuxiaojun514).
2323

24+
## 3.16.2
25+
26+
### Fixes
27+
28+
- `DynamicForm`: Fixing the previous version's issue [#1736](https://github.com/pnp/sp-dev-fx-controls-react/pull/1736) (introduced in [#1718](https://github.com/pnp/sp-dev-fx-controls-react/pull/1718))
29+
30+
### Contributors
31+
32+
Special thanks to our contributor: [IRRDC](https://github.com/IRRDC).
33+
2434
## 3.16.1
2535

2636
### Fixes

docs/documentation/docs/about/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121

2222
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Lars Fernhomberg](https://github.com/lafe), [Mark Bice](https://github.com/mbice), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Tom G](https://github.com/t0mgerman), [wuxiaojun514](https://github.com/wuxiaojun514).
2323

24+
## 3.16.2
25+
26+
### Fixes
27+
28+
- `DynamicForm`: Fixing the previous version's issue [#1736](https://github.com/pnp/sp-dev-fx-controls-react/pull/1736) (introduced in [#1718](https://github.com/pnp/sp-dev-fx-controls-react/pull/1718))
29+
30+
### Contributors
31+
32+
Special thanks to our contributor: [IRRDC](https://github.com/IRRDC).
33+
2434
## 3.16.1
2535

2636
### Fixes

src/common/telemetry/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version: string = "3.17.0";
1+
export const version: string = "3.17.0";

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class DynamicForm extends React.Component<
148148
*/
149149
public render(): JSX.Element {
150150
const { customFormatting, fieldCollection, hiddenByFormula, infoErrorMessages, isSaving } = this.state;
151-
151+
152152
const customFormattingDisabled = this.props.useCustomFormatting === false;
153153

154154
// Custom Formatting - Header
@@ -177,7 +177,7 @@ export class DynamicForm extends React.Component<
177177
footerContent = this._customFormatter.renderCustomFormatContent(customFormatting.footer, this.getFormValuesForValidation(), true) as JSX.Element;
178178
}
179179

180-
// Content Type
180+
// Content Type
181181
let contentTypeId = this.props.contentTypeId;
182182
if (this.state.contentTypeId !== undefined) contentTypeId = this.state.contentTypeId;
183183

@@ -300,7 +300,7 @@ export class DynamicForm extends React.Component<
300300
);
301301
}
302302

303-
private updateFormMessages(type: MessageBarType, message: string): void {
303+
private updateFormMessages(type: MessageBarType, message: string): void {
304304
const { infoErrorMessages } = this.state;
305305
const newMessages = infoErrorMessages.slice();
306306
newMessages.push({ type, message });
@@ -319,7 +319,7 @@ export class DynamicForm extends React.Component<
319319
validationErrorDialogProps,
320320
returnListItemInstanceOnSubmit
321321
} = this.props;
322-
322+
323323
let contentTypeId = this.props.contentTypeId;
324324
if (this.state.contentTypeId !== undefined) contentTypeId = this.state.contentTypeId;
325325

@@ -490,7 +490,7 @@ export class DynamicForm extends React.Component<
490490
} else {
491491
objects[columnInternalName] = null;
492492
}
493-
}
493+
}
494494
}
495495
}
496496

@@ -614,7 +614,7 @@ export class DynamicForm extends React.Component<
614614
}
615615
console.log("Error", error);
616616
}
617-
}
617+
}
618618

619619
this.setState({
620620
isSaving: false,
@@ -645,7 +645,7 @@ export class DynamicForm extends React.Component<
645645
returnListItemInstanceOnSubmit
646646
} = this.props;
647647

648-
648+
649649
if (selectedFile !== undefined) {
650650
try {
651651
const idField = "ID";
@@ -659,14 +659,14 @@ export class DynamicForm extends React.Component<
659659
"_"
660660
) // Replace not allowed chars in folder name
661661
: ""; // Empty string will be replaced by SPO with Folder Item ID
662-
662+
663663
const fileCreatedResult = await library.rootFolder.files.addChunked(encodeURI(itemTitle), await selectedFile.downloadFileContent());
664664
const fields = await fileCreatedResult.file.listItemAllFields();
665-
665+
666666
if (fields[idField]) {
667667
// Read the ID of the just created folder or Document Set
668668
const folderId = fields[idField];
669-
669+
670670
// Set the content type ID for the target item
671671
objects[contentTypeIdField] = contentTypeId;
672672
// Update the just created folder or Document Set
@@ -783,7 +783,7 @@ export class DynamicForm extends React.Component<
783783
fieldCollection: fieldCol,
784784
validationErrors
785785
}, () => {
786-
if (validate) this.performValidation();
786+
if (validate) this.performValidation();
787787
});
788788
};
789789

@@ -820,7 +820,7 @@ export class DynamicForm extends React.Component<
820820
* @param formulas A Record / dictionary-like object, where key is internal column name and value is an object with ValidationFormula and ValidationMessage properties
821821
* @param returnMessages Determines whether a Record of error messages is returned or an array of column names that have failed validation
822822
* @param requireValue Set to true if the formula should only be evaluated when the field has a value
823-
* @returns
823+
* @returns
824824
*/
825825
private evaluateFormulas = (
826826
formulas: Record<string, Pick<ISPField, "ValidationFormula" | "ValidationMessage">>,
@@ -852,12 +852,12 @@ export class DynamicForm extends React.Component<
852852
}
853853

854854
/**
855-
* Used for validation. Returns a Record of field values, where key is internal column name and value is the field value.
855+
* Used for validation. Returns a Record of field values, where key is internal column name and value is the field value.
856856
* Expands certain properties and stores many of them as primitives (strings, numbers or bools) so the expression evaluator
857857
* can process them. For example: a User column named Person will have values stored as Person, Person.email, Person.title etc.
858-
* This is so the expression evaluator can process expressions like '=[$Person.title] == "Contoso Employee 1138"'
858+
* This is so the expression evaluator can process expressions like '=[$Person.title] == "Contoso Employee 1138"'
859859
* @param fieldCollection Optional. Could be used to compare field values in state with previous state.
860-
* @returns
860+
* @returns
861861
*/
862862
private getFormValuesForValidation = (fieldCollection?: IDynamicFieldProps[]): Context => {
863863
const { fieldCollection: fieldColFromState } = this.state;
@@ -911,7 +911,7 @@ export class DynamicForm extends React.Component<
911911
onListItemLoaded,
912912
} = this.props;
913913
let contentTypeId = this.props.contentTypeId;
914-
914+
915915
try {
916916

917917
// Fetch form rendering information from SharePoint
@@ -992,7 +992,7 @@ export class DynamicForm extends React.Component<
992992
// Get installed languages for Currency fields
993993
let installedLanguages: IInstalledLanguageInfo[];
994994
if (tempFields.filter(f => f.fieldType === "Currency").length > 0) {
995-
installedLanguages = await sp.web.regionalSettings.getInstalledLanguages();
995+
installedLanguages = await sp.web.regionalSettings.getInstalledLanguages();
996996
}
997997

998998
this.setState({
@@ -1025,7 +1025,7 @@ export class DynamicForm extends React.Component<
10251025
* @param listId SharePoint List ID
10261026
* @param listItemId SharePoint List Item ID
10271027
* @param disabledFields Fields that should be disabled due to configuration
1028-
* @returns
1028+
* @returns
10291029
*/
10301030
// eslint-disable-next-line @typescript-eslint/no-explicit-any
10311031
private async buildFieldCollection(listInfo: IRenderListDataAsStreamClientFormResult, contentTypeName: string, item: any, numberFields: ISPField[], listId: string, listItemId: number, disabledFields: string[]): Promise<IDynamicFieldProps[]> {

0 commit comments

Comments
 (0)