-
Notifications
You must be signed in to change notification settings - Fork 76
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: setFocus
methods should wait for component to be ready.
#6156
Conversation
…nframe` methods. #3580
# Conflicts: # src/components/modal/modal.tsx # src/components/panel/panel.tsx # src/components/popover/popover.tsx
componentOnReady
and requestAnimationframe
methodscomponentOnReady
method
componentOnReady
methodsetFocus
methods should wait for componentOnReady
@benelan it seems like only This leads me to think we should maybe be documenting This following scenario requires a user use
@eriklharper @benelan What are your thoughts on whether we should document the stencil method |
It depends on the component and the time it takes to load. Try it with But I'll clean it up this/next week with the correct info. |
Thats opposite of what I was seeing with that component LOL. When I had requestAnimationFrame inside setFocus it would break the disabled commonTest. |
lol weird. Did you test it in the demos? When I tested in the demos with inline editable I'm pretty sure it needed requestAnimationFrame. Might need some tweaks to the Try using the demo on this branch: |
setFocus
methods should wait for componentOnReady
setFocus
methods should wait for component to be ready.
Wholeheartedly yes I think it would be beneficial to document this, not just for our users but for contributors as well. I've been bit by this so many times, I created my own snippet in VS Code for inserting this code into an HTML script tag for demo work:
|
Yeah I'll clean up the existing doc right now |
Doc is updated on next: https://next.sites.afd.arcgis.com/calcite-design-system/web-concepts/#component-on-ready |
@benelan every component seems to be good except for |
code changes LGTM, I'll do some demo testing in the next couple days just to be sure |
Did some testing and looks good! |
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
I think the @benelan We should be able to proceed on this by reverting the switch to WRT documentation, I think it's a good idea to add a snippet, but let's try to create an issue on Stencil's doc site. The burden of doc'ing |
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
Related Issue: #3580
Summary
fix:
setFocus
methods should wait for component to be ready..See: https://github.com/ionic-team/stencil/blob/main/src/runtime/readme.md#lifecycle-process