Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: When AutoSuggestBox resizes, it re-opens its dropdown馃悰 #456

Closed
pamtbaau opened this issue Aug 7, 2022 · 2 comments 路 Fixed by #458
Closed

v4: When AutoSuggestBox resizes, it re-opens its dropdown馃悰 #456

pamtbaau opened this issue Aug 7, 2022 · 2 comments 路 Fixed by #458
Labels
bug Something isn't working

Comments

@pamtbaau
Copy link

pamtbaau commented Aug 7, 2022

Describe the bug
I have a Row that contains two widgets:

  • AutoSuggestBox inside an Expanded
  • TextBox inside an IntrinsicWidth

When a selection is made with AutoSuggestBox, in its onSelected event, the controller.text is set for the TextBox. Since the TextBox is inside an IntrinsicWidth, it resizes when the length of its content changes, which in turn causes a resize of the AutoSuggestBox.

When the resize of the AutoSuggestBox happens, it re-opens its dropdown.

This behaviour happens with version 4.0.0-pre.2 and not with version 3.

Note: This behaviour does not occur when the resize of the AutoSuggestBox happens due to a Button click. It only happens when the resize is caused during the onSelected event of the AutoSuggestBox.

To Reproduce
A reproducible case is available

Expected behavior
Like with v3 of fluent_ui, I expect the dropdown not to re-open when the AutoSuggestBox resizes.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@bdlukaa bdlukaa added the bug Something isn't working label Aug 7, 2022
@bdlukaa
Copy link
Owner

bdlukaa commented Aug 7, 2022

For reference: https://github.com/bdlukaa/fluent_ui/blob/master/lib/src/controls/form/auto_suggest_box.dart#L396-L400

We must check if popup is open before opening it

@pamtbaau
Copy link
Author

pamtbaau commented Aug 8, 2022

Tested and working fine!

Thank you very much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants