-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add Component.isAttached() #7911
Comments
I wonder if a component may be perceived as attached even if the UI itself is detached from the session? |
I agree it's not obvious but I would avoid put everything into I would close this ticket but it's up to you. |
There are the following arguments for the benefit of having such API:
Additional remarks:
I therefore insist on keeping the bug open as a minimum; moreover I think the API would be beneficial and should be implemented. |
Alright. The ticket makes sense. |
Thank you. The Hmm, it sounds like the component is not yet detached at all during the call to |
I'm not sure.......
Technically you are right: the parent is assigned only after the detach event is fired but should be assigned before. Also you don't need to check |
I agree, exactly my thoughts.
I agree, I've opened #8809 and tried to summarize the discussion above there. |
Will this be backported to Vaadin 14? (it's marked as released but I can't see the function in Vaadin 14.6.8). |
Hasn't been backported because nobody has just done it. It should have been though, so I'm even willing to make another Flow 2.7 beta for it. |
Thank you @pleku , really appreciated 🥇 |
Currently in Vaadin 14.1.19 it's only possible to check whether a component is attached, by running the following method:
It would be good to have
Component.isAttached()
directly provided by Vaadin.The text was updated successfully, but these errors were encountered: