Skip to content
Snippets Groups Projects
Commit 2f51d136 authored by Tom Robinson's avatar Tom Robinson
Browse files

Add non-multi support to SelectPicker

parent 83b688b5
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,12 @@ import CheckBox from 'metabase/components/CheckBox.react';
export default class SelectPicker extends Component {
selectValue(key, selected) {
let values = this.props.values.slice().filter(v => v != null);
let values;
if (this.props.multi) {
values = this.props.values.slice().filter(v => v != null);
} else {
values = []
}
if (selected) {
values.push(key);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment