diff --git a/components/autocomplete/Autocomplete.js b/components/autocomplete/Autocomplete.js index d149c581..3e01cc2e 100644 --- a/components/autocomplete/Autocomplete.js +++ b/components/autocomplete/Autocomplete.js @@ -10,6 +10,8 @@ import InjectChip from '../chip/Chip.js'; import InjectInput from '../input/Input.js'; import events from '../utils/events.js'; import Portal from '../hoc/Portal'; +import TransitionGroup from 'react-transition-group/TransitionGroup'; +import Transition from 'react-transition-group/Transition'; const POSITION = { AUTO: 'auto', @@ -190,6 +192,7 @@ const factory = (Chip, Input) => { if (maxHeight > screen_height*0.45) { maxHeight = Math.floor(screen_height*0.45); } + maxHeight = maxHeight+'px'; if (this.state.top !== top || this.state.left !== left || this.state.width !== width || this.state.bottom !== bottom || this.state.maxHeight !== maxHeight) { @@ -378,7 +381,7 @@ const factory = (Chip, Input) => { renderSuggestions() { const { theme } = this.props; - const suggestions = [...this.suggestions()].map(([key, value]) => { + return [...this.suggestions()].map(([key, value]) => { const className = classnames(theme.suggestion, { [theme.active]: this.state.active === key }); return (