fix: leptos 0.7-beta5 changes method trigger to notify (#253)

This commit is contained in:
Adam 2024-09-09 01:48:59 -04:00 committed by GitHub
parent 9ffb29c8b2
commit 406fefb69b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -75,7 +75,7 @@ impl ListboxInjection {
#[inline] #[inline]
pub fn trigger(&self) { pub fn trigger(&self) {
self.0.trigger(); self.0.notify();
} }
} }

View file

@ -47,7 +47,7 @@ pub fn TagPickerInput(#[prop(optional, into)] class: MaybeProp<String>) -> impl
on:blur=on_blur on:blur=on_blur
on:input=on_input on:input=on_input
prop:value=move || { prop:value=move || {
value_trigger.trigger(); value_trigger.notify();
"" ""
} }
/> />

View file

@ -48,7 +48,7 @@ pub fn Textarea(
let input_value = event_target_value(&ev); let input_value = event_target_value(&ev);
if let Some(allow_value) = allow_value.as_ref() { if let Some(allow_value) = allow_value.as_ref() {
if !allow_value(input_value.clone()) { if !allow_value(input_value.clone()) {
value_trigger.trigger(); value_trigger.notify();
return; return;
} }
} }

View file

@ -43,7 +43,7 @@ impl ToasterInjection {
pub fn dispatch_toast(&self, any_view: AnyView<Dom>, options: ToastOptions) { pub fn dispatch_toast(&self, any_view: AnyView<Dom>, options: ToastOptions) {
self.sender self.sender
.with_value(|sender| sender.send((any_view, options)).unwrap_throw()); .with_value(|sender| sender.send((any_view, options)).unwrap_throw());
self.trigger.with_value(|trigger| trigger.trigger()); self.trigger.with_value(|trigger| trigger.notify());
} }
} }