Skip to content

Commit

Permalink
Add multiselection param to constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
ialarmedalien committed May 13, 2022
1 parent e609012 commit 63a8f02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kbase-extension/static/kbase/js/common/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ define(['common/props'], (Props) => {
case 'dropdown':
constraints = {
options: spec.dropdown_options ? spec.dropdown_options.options : {},
multiselection:
spec.dropdown_options && spec.dropdown_options.multiselection
? spec.dropdown_options.multiselection
: 0,
};
break;
case 'textarea':
Expand Down
3 changes: 3 additions & 0 deletions test/unit/spec/common/sdk-Spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ define([
constraints: {
required,
...dropdownOptions,
multiselection: 0,
},
nullValue: '',
defaultValue: 'CSV',
Expand Down Expand Up @@ -143,6 +144,7 @@ define([
constraints: {
required,
...dropdownOptions,
multiselection: 0,
},
defaultValue: 'CSV',
nullValue: '',
Expand All @@ -159,6 +161,7 @@ define([
constraints: {
required,
...dropdownOptions,
multiselection: 1,
},
nullValue: [],
defaultValue: multiSelect.default_values,
Expand Down

0 comments on commit 63a8f02

Please sign in to comment.