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

Fix issues after TreeSelect is unmounted #777

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Jun 6, 2023

No description provided.

@thecalcc thecalcc requested a review from dzonidoo June 6, 2023 09:57
@thecalcc thecalcc merged commit 114dec6 into superdesk:develop Jun 6, 2023
&& (this.openDropdownRef.current?.contains(event.target as HTMLElement) !== true)
) {
this.setState({openDropdown: false});
onMouseDown = (event: MouseEvent) => {
Copy link
Member

Choose a reason for hiding this comment

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

FYI this is not a class method, but a public class field and doesn't need binding. It also works a bit differently than methods in more complex case like inheritance. It also has a negative performance impact that might be significant or not depending on usage. Because of this and the fact that didn't fully investigate the feature I prefer using class methods. It might be worth looking into it in the future since it allows for shorter code in some cases.

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