Skip to content

Commit edf6253

Browse files
Merge pull request #1645 from michaelmaillot/fix/dynamicform-taxonomy
Fix DynamicForm - Taxonomy field
2 parents ce9d6e6 + be5db12 commit edf6253

File tree

6 files changed

+109
-53
lines changed

6 files changed

+109
-53
lines changed

CHANGELOG.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"[Nils Andresen](https://github.com/nils-a)",
2222
"[Nishkalank Bezawada](https://github.com/NishkalankBezawada)",
2323
"[Rico van de Ven](https://github.com/RicoNL)",
24-
"[wuxiaojun514](https://github.com/wuxiaojun514)",
24+
"[wuxiaojun514](https://github.com/wuxiaojun514)"
2525
]
2626
},
2727
{

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 3.16.0
4+
5+
### New control(s)
6+
7+
- `ViewPicker`: new control ViewPicker [#1439](https://github.com/pnp/sp-dev-fx-controls-react/issues/1439)
8+
9+
### Enhancements
10+
11+
- `FieldCollectionData`: render on page instead of panel and added combobox and peoplepicker controls [#1588](https://github.com/pnp/sp-dev-fx-controls-react/pull/1588)
12+
13+
### Fixes
14+
15+
- `AccessibleAccordion`: fix typo in documentation [#1634](https://github.com/pnp/sp-dev-fx-controls-react/pull/1634)
16+
- `DynamicForm`: fix issue with MultiChoice field [#1510](https://github.com/pnp/sp-dev-fx-controls-react/issues/1510)
17+
- `Localization`: Update dutch translations [#1635](https://github.com/pnp/sp-dev-fx-controls-react/issues/1635)
18+
- `TaxonomyPicker`: suggested item contains double termset name [#1597](https://github.com/pnp/sp-dev-fx-controls-react/issues/1597)
19+
20+
### Contributors
21+
22+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [wuxiaojun514](https://github.com/wuxiaojun514).
23+
324
## 3.15.0
425

526
### New control(s)

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 3.16.0
4+
5+
### New control(s)
6+
7+
- `ViewPicker`: new control ViewPicker [#1439](https://github.com/pnp/sp-dev-fx-controls-react/issues/1439)
8+
9+
### Enhancements
10+
11+
- `FieldCollectionData`: render on page instead of panel and added combobox and peoplepicker controls [#1588](https://github.com/pnp/sp-dev-fx-controls-react/pull/1588)
12+
13+
### Fixes
14+
15+
- `AccessibleAccordion`: fix typo in documentation [#1634](https://github.com/pnp/sp-dev-fx-controls-react/pull/1634)
16+
- `DynamicForm`: fix issue with MultiChoice field [#1510](https://github.com/pnp/sp-dev-fx-controls-react/issues/1510)
17+
- `Localization`: Update dutch translations [#1635](https://github.com/pnp/sp-dev-fx-controls-react/issues/1635)
18+
- `TaxonomyPicker`: suggested item contains double termset name [#1597](https://github.com/pnp/sp-dev-fx-controls-react/issues/1597)
19+
20+
### Contributors
21+
22+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [wuxiaojun514](https://github.com/wuxiaojun514).
23+
324
## 3.15.0
425

526
### New control(s)

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.15.0";
1+
export const version: string = "3.16.0";

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ export class DynamicForm extends React.Component<
255255
} else if (fieldType === "TaxonomyFieldType") {
256256
objects[columnInternalName] = {
257257
__metadata: { type: "SP.Taxonomy.TaxonomyFieldValue" },
258-
Label: value[0].name,
259-
TermGuid: value[0].key,
258+
Label: value[0]?.name ?? "",
259+
TermGuid: value[0]?.key ?? "11111111-1111-1111-1111-111111111111",
260260
WssId: "-1",
261261
};
262262
} else if (fieldType === "TaxonomyFieldTypeMulti") {
@@ -414,6 +414,7 @@ export class DynamicForm extends React.Component<
414414
// trigger when the user change any value in the form
415415
private onChange = async (
416416
internalName: string,
417+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
417418
newValue: any,
418419
additionalData?: FieldChangeAdditionalData
419420
): Promise<void> => {
@@ -774,6 +775,7 @@ export class DynamicForm extends React.Component<
774775
listId: string,
775776
contentTypeId: string | undefined,
776777
webUrl?: string
778+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
777779
): Promise<any> => {
778780
// eslint-disable-line @typescript-eslint/no-explicit-any
779781
try {

0 commit comments

Comments
 (0)