Skip to content

Commit 0314111

Browse files
Merge v3.16.1 release into dev
2 parents 4a24d81 + f293392 commit 0314111

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

CHANGELOG.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
"[Tom G](https://github.com/t0mgerman)"
1818
]
1919
},
20+
{
21+
"version": "3.16.1",
22+
"changes": {
23+
"fixes": [
24+
"`DynamicForm`: Additional check to see if DefaultValue is an object. No more null comparisons, which should have been undefined comparisons"
25+
]
26+
},
27+
"contributions": [
28+
"[IRRDC](https://github.com/IRRDC)"
29+
]
30+
},
2031
{
2132
"version": "3.16.0",
2233
"changes": {

CHANGELOG.md

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

1616
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Tom G](https://github.com/t0mgerman).
1717

18+
## 3.16.1
19+
20+
### Fixes
21+
22+
- `DynamicForm`: Additional check to see if DefaultValue is an object. No more null comparisons, which should have been undefined comparisons
23+
24+
### Contributors
25+
26+
Special thanks to our contributor: [IRRDC](https://github.com/IRRDC).
27+
1828
## 3.16.0
1929

2030
### New control(s)

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

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

1616
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Tom G](https://github.com/t0mgerman).
1717

18+
## 3.16.1
19+
20+
### Fixes
21+
22+
- `DynamicForm`: Additional check to see if DefaultValue is an object. No more null comparisons, which should have been undefined comparisons
23+
24+
### Contributors
25+
26+
Special thanks to our contributor: [IRRDC](https://github.com/IRRDC).
27+
1828
## 3.16.0
1929

2030
### New control(s)

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,17 +1192,26 @@ export class DynamicForm extends React.Component<
11921192
hiddenName = field.HiddenListInternalName;
11931193
termSetId = field.TermSetId;
11941194
anchorId = field.AnchorId;
1195-
if (item !== null) {
1195+
if (item && item[field.InternalName] && item[field.InternalName].results) {
11961196
item[field.InternalName].forEach((element) => {
11971197
selectedTags.push({
11981198
key: element.TermGuid,
11991199
name: element.Label,
12001200
});
12011201
});
12021202

1203+
defaultValue = selectedTags;
1204+
} else if (defaultValue && defaultValue.results) {
1205+
defaultValue.results.forEach((element) => {
1206+
selectedTags.push({
1207+
key: element.TermGuid,
1208+
name: element.Label,
1209+
});
1210+
});
1211+
12031212
defaultValue = selectedTags;
12041213
} else {
1205-
if (defaultValue !== null && defaultValue !== "") {
1214+
if (defaultValue && defaultValue !== "") {
12061215
defaultValue.split(/#|;/).forEach((element) => {
12071216
if (element.indexOf("|") !== -1)
12081217
selectedTags.push({

0 commit comments

Comments
 (0)