Ensure a no-items message is displayed if a query is entered but no items have ever been loaded

This commit is contained in:
Tom Southall
2022-03-15 13:20:15 +00:00
parent ba6610a66c
commit c762a77c76
5 changed files with 21 additions and 17 deletions

View File

@@ -81,7 +81,7 @@ export default function Container(props) {
const hasTypeahead = typeahead && state.items.length > 1
const hasClearButton = clearButton && !!state.query
const hasCancelButton = cancelButton && hasFocus
const isExpanded = hasFocus && state.itemsLoaded
const isExpanded = hasFocus && state.canShowListbox
const isErrorExpanded = !!props.errorMessage && state.itemsError
const containerClassname = hasFocus ? 'containerFocus' : 'container'
const containerStyles = customStyles[containerClassname] || customStyles.container