From 4c7327c320c55e35778a9172cf45ad53233fd9f2 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Thu, 18 Apr 2024 12:02:49 +0200 Subject: [PATCH] bin: Use textfield state in search widget --- bin/commands/inbox/select/ui.rs | 6 +++--- bin/commands/issue/select/ui.rs | 6 +++--- bin/commands/patch/select/ui.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/commands/inbox/select/ui.rs b/bin/commands/inbox/select/ui.rs index 77a69382..e0e50e24 100644 --- a/bin/commands/inbox/select/ui.rs +++ b/bin/commands/inbox/select/ui.rs @@ -477,11 +477,11 @@ impl View for Search { Self: Sized, { let input = TextField::new(state, action_tx.clone()) - .on_change(|props, action_tx| { - props.downcast_ref::().and_then(|props| { + .on_change(|state, action_tx| { + state.downcast_ref::().and_then(|state| { action_tx .send(Action::UpdateSearch { - value: props.text.clone(), + value: state.text.clone(), }) .ok() }); diff --git a/bin/commands/issue/select/ui.rs b/bin/commands/issue/select/ui.rs index 87303b4c..6c9cd0b6 100644 --- a/bin/commands/issue/select/ui.rs +++ b/bin/commands/issue/select/ui.rs @@ -502,11 +502,11 @@ impl View for Search { Self: Sized, { let input = TextField::new(state, action_tx.clone()) - .on_change(|props, action_tx| { - props.downcast_ref::().and_then(|props| { + .on_change(|state, action_tx| { + state.downcast_ref::().and_then(|state| { action_tx .send(Action::UpdateSearch { - value: props.text.clone(), + value: state.text.clone(), }) .ok() }); diff --git a/bin/commands/patch/select/ui.rs b/bin/commands/patch/select/ui.rs index f1e6519b..fe268a04 100644 --- a/bin/commands/patch/select/ui.rs +++ b/bin/commands/patch/select/ui.rs @@ -531,11 +531,11 @@ impl View for Search { Self: Sized, { let input = TextField::new(state, action_tx.clone()) - .on_change(|props, action_tx| { - props.downcast_ref::().and_then(|props| { + .on_change(|state, action_tx| { + state.downcast_ref::().and_then(|state| { action_tx .send(Action::UpdateSearch { - value: props.text.clone(), + value: state.text.clone(), }) .ok() });