Skip to content

Commit

Permalink
[Select] hide QueryList item list when menuContent and createItemView…
Browse files Browse the repository at this point in the history
… are both null (#3426)
  • Loading branch information
tnrich authored and adidahiya committed Mar 22, 2019
1 parent 00b7602 commit 4395132
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/select/src/components/query-list/queryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ export class QueryList<T> extends React.Component<IQueryListProps<T>, IQueryList
const maybeNoResults = this.isCreateItemRendered() ? null : noResults;
const menuContent = renderFilteredItems(listProps, maybeNoResults, initialContent);
const createItemView = this.isCreateItemRendered() ? this.renderCreateItemMenuItem(this.state.query) : null;
if (menuContent == null && createItemView == null) {
return null;
}
return (
<Menu ulRef={listProps.itemsParentRef}>
{menuContent}
Expand Down

1 comment on commit 4395132

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Select] hide QueryList item list when menuContent and createItemView are both null (#3426)

Previews: documentation | landing | table

Please sign in to comment.