File tree Expand file tree Collapse file tree 4 files changed +42
-2
lines changed
docs/documentation/docs/about Expand file tree Collapse file tree 4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 17
17
" [Tom G](https://github.com/t0mgerman)"
18
18
]
19
19
},
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
+ },
20
31
{
21
32
"version" : " 3.16.0" ,
22
33
"changes" : {
Original file line number Diff line number Diff line change 15
15
16
16
Special thanks to our contributors (in alphabetical order): [ Guido Zambarda] ( https://github.com/GuidoZam ) , [ Tom G] ( https://github.com/t0mgerman ) .
17
17
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
+
18
28
## 3.16.0
19
29
20
30
### New control(s)
Original file line number Diff line number Diff line change 15
15
16
16
Special thanks to our contributors (in alphabetical order): [ Guido Zambarda] ( https://github.com/GuidoZam ) , [ Tom G] ( https://github.com/t0mgerman ) .
17
17
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
+
18
28
## 3.16.0
19
29
20
30
### New control(s)
Original file line number Diff line number Diff line change @@ -1192,17 +1192,26 @@ export class DynamicForm extends React.Component<
1192
1192
hiddenName = field . HiddenListInternalName ;
1193
1193
termSetId = field . TermSetId ;
1194
1194
anchorId = field . AnchorId ;
1195
- if ( item !== null ) {
1195
+ if ( item && item [ field . InternalName ] && item [ field . InternalName ] . results ) {
1196
1196
item [ field . InternalName ] . forEach ( ( element ) => {
1197
1197
selectedTags . push ( {
1198
1198
key : element . TermGuid ,
1199
1199
name : element . Label ,
1200
1200
} ) ;
1201
1201
} ) ;
1202
1202
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
+
1203
1212
defaultValue = selectedTags ;
1204
1213
} else {
1205
- if ( defaultValue !== null && defaultValue !== "" ) {
1214
+ if ( defaultValue && defaultValue !== "" ) {
1206
1215
defaultValue . split ( / # | ; / ) . forEach ( ( element ) => {
1207
1216
if ( element . indexOf ( "|" ) !== - 1 )
1208
1217
selectedTags . push ( {
You can’t perform that action at this time.
0 commit comments