Skip to content

fix(core): compute open state on focus with shouldPanelOpen#456

Merged
francoischalifour merged 1 commit intonextfrom
fix/onFocus-with-shouldPanelOpen
Feb 19, 2021
Merged

fix(core): compute open state on focus with shouldPanelOpen#456
francoischalifour merged 1 commit intonextfrom
fix/onFocus-with-shouldPanelOpen

Conversation

@francoischalifour
Copy link
Copy Markdown
Contributor

Description

This improves the experience when using openOnFocus on slow networks. The panel only opens when shouldPanelOpen returns true.

The default implementation for shouldPanelOpen is to return true when there are some items. As a result, the panel won't open on focus as long as there's no results. This means that the panel won't open with empty content.

Preview

Before

ac-onFocus-without-shouldPanelOpen

After

ac-onFocus-with-shouldPanelOpen

@Shipow
Copy link
Copy Markdown
Contributor

Shipow commented Feb 19, 2021

solid improvement

Copy link
Copy Markdown
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Cool addition!

@francoischalifour francoischalifour merged commit dd28098 into next Feb 19, 2021
@francoischalifour francoischalifour deleted the fix/onFocus-with-shouldPanelOpen branch February 19, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants