diff --git a/packages/terra-form-select/src/combobox/Menu.jsx b/packages/terra-form-select/src/combobox/Menu.jsx index 7a213a934cb..63698bb9039 100644 --- a/packages/terra-form-select/src/combobox/Menu.jsx +++ b/packages/terra-form-select/src/combobox/Menu.jsx @@ -10,6 +10,7 @@ import ClearOption from '../shared/_ClearOption'; import MenuUtil from '../shared/_MenuUtil'; import SharedUtil from '../shared/_SharedUtil'; import styles from '../shared/_Menu.module.scss'; +import NoResults from '../shared/_NoResults'; const cx = classNamesBind.bind(styles); @@ -119,16 +120,21 @@ class Menu extends React.Component { */ static getDerivedStateFromProps(props, state) { const { - clearOptionDisplay, searchValue, + clearOptionDisplay, searchValue, noResultContent, } = props; - const hasNoResults = false; + let hasNoResults = false; const hasMaxSelection = false; let hasAddOption = false; let children = MenuUtil.filter(props.children, props.searchValue, props.optionFilter); children = MenuUtil.updateSelectionState(children, props); + if (!children.length) { + children.push(); + hasNoResults = true; + } + if (Menu.shouldAllowFreeText(props, children)) { children.push(); hasAddOption = true;