feat: import only flatMap from lodash
parent
30b7efd585
commit
73b726e5fb
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
|
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import _ from 'lodash';
|
import flatMap from 'lodash/flatMap';
|
||||||
|
|
||||||
import {getCompletions} from '../../../autocomplete/Autocompleter';
|
import {getCompletions} from '../../../autocomplete/Autocompleter';
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ export default class Autocomplete extends React.Component {
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
completions: newCompletions,
|
completions: newCompletions,
|
||||||
completionList: _.flatMap(newCompletions, provider => provider.completions),
|
completionList: flatMap(newCompletions, provider => provider.completions),
|
||||||
});
|
});
|
||||||
}, err => {
|
}, err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
Loading…
Reference in New Issue