Skip to content

Commit

Permalink
fix: display object types correctly in SetProperties (#2335)
Browse files Browse the repository at this point in the history
In 'Microsoft.SetProperties', the 'value' field of an assignment could be either object or string. Stringify the value if it's an object.
#2309

Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
yeze322 and a-b-r-o-w-n committed Mar 23, 2020
1 parent 5886710 commit 3ca3cf9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ export const uiSchema: UISchema = {
<ListOverview
items={data.assignments}
itemPadding={8}
renderItem={item => {
const content = `${item.property} : ${item.value}`;
renderItem={({ property, value }) => {
const v = typeof value === 'object' ? JSON.stringify(value) : value;
const content = `${property} : ${v}`;
return (
<SingleLineDiv height={16} title={content}>
{content}
Expand Down

0 comments on commit 3ca3cf9

Please sign in to comment.