Skip to content

Commit

Permalink
Replace omit with pick
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Apr 21, 2022
1 parent 5ce9455 commit ed5942e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 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, without} from 'ramda';
import {isNil, pluck, without, pick} from 'ramda';
import React, {useState, useCallback, useEffect, useMemo} from 'react';
import ReactDropdown from 'react-virtualized-select';
import createFilterOptions from 'react-select-fast-filter-options';
Expand All @@ -21,6 +21,18 @@ const TOKENIZER = {
},
};

const RDProps = [
'multi',
'clearable',
'searchable',
'search_value',
'placeholder',
'disabled',
'optionHeight',
'style',
'className',
];

const Dropdown = props => {
const {
id,
Expand Down Expand Up @@ -107,7 +119,7 @@ const Dropdown = props => {
backspaceRemoves={clearable}
deleteRemoves={clearable}
inputProps={{autoComplete: 'off'}}
{...omit(['setProps', 'value', 'options'], props)}
{...pick(RDProps, props)}
/>
</div>
);
Expand Down

0 comments on commit ed5942e

Please sign in to comment.