-
Notifications
You must be signed in to change notification settings - Fork 17
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
Ability to prevent/cancel fetch on focus #31
Comments
Yep sounds like a great addition 👍
We try to follow the HTML Standard for this: https://html.spec.whatwg.org/#concept-media-load-algorithm. Media should be loaded roughly like this:
In this case it I believe
This is certainly intentional. We try to expose public interfaces with intentionality. Having said that this project pre-dates our use of Private Fields which, if you are undertaking a refactor, I would encourage you to use over WeakMaps as they do offer better ergonomics. If you wish to expose some state to allow for monkey patching, we're happy to discuss ideas - please provide a reasonable use case, so we can explore what an API might look like. |
Other elements we have assign a The deps is likely because this element hasn't been updated in a while. I'm not sure where |
I'm using the remote input in a SelectMenu. The menu's SelectMenu-list is controlled by the remote input. When the page is rendered server-side, a few commonly used items are rendered in the SelectMenu-list to save the user time. The problem I have is these items are instantly cleared when the SelectMenu opens and the remote input receives focus due to the remote input doing the initial fetch.
Would the team be open to a PR that makes it possible to skip/cancel the initial fetch? I'd like to avoid the unnecessary round-trip to the server to get suggestions for the empty string query and preserve by server-side rendered default SelectMenu items. If yes, should it be done via html attribute or by preventing default on one of the custom events?
Two other questions:
remote-input-element/src/index.ts
Lines 132 to 134 in 4ec740a
Thank you for sharing the github elements. They're super useful and I love the decoupling of the styles from the behavior.
The text was updated successfully, but these errors were encountered: