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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single method to open/close flyout #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ericholscher
Copy link
Member

Fixes #541

@ericholscher ericholscher requested review from humitos and a team as code owners February 18, 2025 22:21
};

_hideFlyout = (e) => {
this.opened = false;
this._close();
Copy link
Contributor

Choose a reason for hiding this comment

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

Lit provides a native way to update dependent attributes/variables on reactive property changes. We should use that pattern instead of relying on manually calling methods like this. With willUpdate(), the current code would be fine

https://lit.dev/docs/components/lifecycle/#willupdate

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Take a look at the tests I wrote and try to write a test case for this case. These cases where we need to interact with the elements to do QA are pretty hard to notice after deploy otherwise.

@ericholscher
Copy link
Member Author

Cool... I'm a little lost in general with all of this, so might take a while to get back to this.

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.

Flyout gets reset in odd state after search is opened
3 participants