Skip to content

Commit

Permalink
fix(powerautomate): Serialize combobox value as json if value is an o…
Browse files Browse the repository at this point in the history
…bject (#4473)

* Check if serializedValue is an object

* Update index.tsx

---------

Co-authored-by: Ram Gupta <Ram.Gupta@microsoft.com>
  • Loading branch information
Ram-G and Ram Gupta committed Mar 28, 2024
1 parent 62f82bb commit 8fd8267
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/designer-ui/src/lib/combobox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ export const Combobox = ({
const currSelectedKey = option.key.toString();
setSelectedKey(currSelectedKey);
setMode(Mode.Default);
const selectedValue = getSelectedValue(options, currSelectedKey);
const value = typeof selectedValue === 'object' ? JSON.stringify(selectedValue) : selectedValue.toString();
onChange?.({
value: [createLiteralValueSegment(currSelectedKey ? getSelectedValue(options, currSelectedKey).toString() : '')],
value: [createLiteralValueSegment(currSelectedKey ? value : '')],
});
}
}
Expand Down

0 comments on commit 8fd8267

Please sign in to comment.