Skip to content

Commit

Permalink
fixed dropdown bug plotly#1908
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnMarieW committed Mar 4, 2022
1 parent 58bec06 commit 85a86a1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions components/dash-core-components/src/fragments/Dropdown.react.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isNil, pluck, omit, type} from 'ramda';
import {isNil, pluck, omit} from 'ramda';
import React, {Component} from 'react';
import ReactDropdown from 'react-virtualized-select';
import createFilterOptions from 'react-select-fast-filter-options';
Expand All @@ -21,7 +21,6 @@ const TOKENIZER = {
},
};

const DELIMITER = ',';

export default class Dropdown extends Component {
constructor(props) {
Expand Down Expand Up @@ -57,12 +56,6 @@ export default class Dropdown extends Component {
value,
} = this.props;
const {filterOptions} = this.state;
let selectedValue;
if (type(value) === 'Array') {
selectedValue = value.join(DELIMITER);
} else {
selectedValue = value;
}
return (
<div
id={id}
Expand All @@ -75,7 +68,7 @@ export default class Dropdown extends Component {
<ReactDropdown
filterOptions={filterOptions}
options={sanitizeOptions(options)}
value={selectedValue}
value={value}
onChange={selectedOption => {
if (multi) {
let value;
Expand Down

0 comments on commit 85a86a1

Please sign in to comment.