Skip to content

Commit

Permalink
Merge pull request #1718 from IRRDC/master
Browse files Browse the repository at this point in the history
Fixing issue #1717
  • Loading branch information
michaelmaillot authored Jan 7, 2024
2 parents 1c27a30 + 3d681dc commit 40e9ce5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/controls/dynamicForm/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -597,17 +597,26 @@ export class DynamicForm extends React.Component<
hiddenName = response.value;
termSetId = field.TermSetId;
anchorId = field.AnchorId;
if (item !== null && item[field.InternalName] !== null && item[field.InternalName].results !== null) {
if (item && item[field.InternalName] && item[field.InternalName].results) {
item[field.InternalName].results.forEach((element) => {
selectedTags.push({
key: element.TermGuid,
name: element.Label,
});
});

defaultValue = selectedTags;
} else if (defaultValue && defaultValue.results) {
defaultValue.results.forEach((element) => {
selectedTags.push({
key: element.TermGuid,
name: element.Label,
});
});

defaultValue = selectedTags;
} else {
if (defaultValue !== null && defaultValue !== "") {
if (defaultValue && defaultValue !== "") {
defaultValue.split(/#|;/).forEach((element) => {
if (element.indexOf("|") !== -1)
selectedTags.push({
Expand Down

0 comments on commit 40e9ce5

Please sign in to comment.