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 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" : {
Original file line number Diff line number Diff line change 1515
1616Special 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)
Original file line number Diff line number Diff line change 1515
1616Special 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)
Original file line number Diff line number Diff 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 ( {
You can’t perform that action at this time.
0 commit comments