Skip to content

Commit

Permalink
Merge branch 'set-default-column-value-for-taxonomy' of https://githu…
Browse files Browse the repository at this point in the history
…b.com/tavikukko/pnpjs into tavikukko-set-default-column-value-for-taxonomy
  • Loading branch information
juliemturner committed Nov 13, 2020
2 parents 518c87d + 4d98014 commit 02815cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sp/column-defaults/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ _List.prototype.setDefaultColumnValues = async function (this: _List, defaults:
break;

case "Taxonomy":
case "TaxonomyFieldType":
if (isArray(fieldDefault.value)) {
throw Error(`The type '${fieldDef.TypeAsString}' does not support multiple values.`);
} else {
Expand All @@ -160,6 +161,7 @@ _List.prototype.setDefaultColumnValues = async function (this: _List, defaults:
break;

case "TaxonomyMulti":
case "TaxonomyFieldTypeMulti":
if (isArray(fieldDefault.value)) {
value = (<{ wssId: string, termName: string, termId: string }[]>fieldDefault.value).map(v => `${v.wssId};#${v.termName}|${v.termId}`).join(";#");
}
Expand Down

0 comments on commit 02815cc

Please sign in to comment.