UNPKG

react-bootstrap-typeahead

Version:
13 lines (12 loc) 392 B
import getOptionLabel from './getOptionLabel'; function getInputText(props) { const { activeItem, labelKey, multiple, selected, text } = props; if (activeItem) { return getOptionLabel(activeItem, labelKey); } if (!multiple && selected.length && selected[0]) { return getOptionLabel(selected[0], labelKey); } return text; } export default getInputText;