Skip to content

Commit

Permalink
fix: send single element array for only variable option as well
Browse files Browse the repository at this point in the history
  • Loading branch information
vikrantgupta25 committed Sep 19, 2024
1 parent 1b4219d commit 14533cc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ function VariableItem({
(Array.isArray(selectValue) && selectValue?.includes(option.toString()));

if (isChecked) {
if (mode === ToggleTagValue.Only) {
handleChange(option.toString());
if (mode === ToggleTagValue.Only && variableData.multiSelect) {
handleChange([option.toString()]);
} else if (!variableData.multiSelect) {
handleChange(option.toString());
} else {
Expand Down

0 comments on commit 14533cc

Please sign in to comment.