Skip to content

Commit ed5942e

Browse files
committedApr 21, 2022
Replace omit with pick
1 parent 5ce9455 commit ed5942e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed
 

‎components/dash-core-components/src/fragments/Dropdown.react.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {isNil, pluck, omit, without} from 'ramda';
1+
import {isNil, pluck, without, pick} from 'ramda';
22
import React, {useState, useCallback, useEffect, useMemo} from 'react';
33
import ReactDropdown from 'react-virtualized-select';
44
import createFilterOptions from 'react-select-fast-filter-options';
@@ -21,6 +21,18 @@ const TOKENIZER = {
2121
},
2222
};
2323

24+
const RDProps = [
25+
'multi',
26+
'clearable',
27+
'searchable',
28+
'search_value',
29+
'placeholder',
30+
'disabled',
31+
'optionHeight',
32+
'style',
33+
'className',
34+
];
35+
2436
const Dropdown = props => {
2537
const {
2638
id,
@@ -107,7 +119,7 @@ const Dropdown = props => {
107119
backspaceRemoves={clearable}
108120
deleteRemoves={clearable}
109121
inputProps={{autoComplete: 'off'}}
110-
{...omit(['setProps', 'value', 'options'], props)}
122+
{...pick(RDProps, props)}
111123
/>
112124
</div>
113125
);

0 commit comments

Comments
 (0)
Please sign in to comment.