Closed lessless closed 8 years ago
Thank you very much for this, but could you use {{select-box on-focus-in=preloadThings}}
instead?
That should work, although I need to document it.
edit: You can also use {{sb.input focus=doSomething}}
but due to Ember's attrs proxy that will wipe out any existing focus()
functionality
Hm,
there is a weird thing with on-focus-in
- it throws an exception inside jQuery focus-in handler when receives same argument ason-search
does: on-focus-in = attrs.on-search
,
but working fine with component action on-focus-in=(action 'preloadThings')
Anyways, problems seem to be solved, but I will really appreciate if you can give more context about the suggestion in the edit.
update:
there is a subtle nuance - if I just perform search and set availableThings
to the array of returned entities there is a need to call sb.open();
in the on-focus-in
handler for wrapper div to obtain is-open
class.
Otherways it will have only is-focused
despite the fact that it actually displays the results.
This PR adds a
focus-in
handling for thesb.input
. Possible use-case is a data preloading before user started typing.