You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnset_focused_signal<B>(&mutself,value:B)whereB:Signal<Item = bool> + 'static {let element = self.element.as_ref().clone();// This needs to use `after_insert` because calling `.focus()` on an element before it is in the DOM has no effectself.callbacks.after_insert(move |callbacks| {// TODO verify that this is correct under all circumstances
callbacks.after_remove(for_each(value,move |value| {// TODO avoid updating if the focused state hasn't changed ?if value {
bindings::focus(&element);}elseif value {// && [ "date", "datetime-local", "month", "time", "week", "color", "file"].contains(input_type) ??
bindings::show_picker(&element);// COULD ADD HERE?}else{
bindings::blur(&element);// NOT SURE HOW TO HANDLE BLUR-ING}}));});}
The text was updated successfully, but these errors were encountered:
The reason I am hesitant to use with_node! is I try to avoid using macros if possible (due to a few reasons but primarily that it can cause issues with rust-fmt).
Is there a reason its not a properly/"publicly" implemented method?
Focused signal works great for text inputs but for picker style inputs it doesn't work.
Unsure exactly how to implement it though, also heavily dependant on how/if/when the wasm-bindgen guys get the following issue working.
rustwasm/wasm-bindgen#3036
The text was updated successfully, but these errors were encountered: