From f10e936f00d4b83dcacfdebd2727b1a5cd1add95 Mon Sep 17 00:00:00 2001 From: Dan Mishin Date: Fri, 3 Mar 2023 10:01:49 +0300 Subject: Introduce disabled state for `TextInput` --- examples/tour/src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'examples/tour') diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 90868877..3b4cfd2d 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -570,13 +570,10 @@ impl<'a> Step { bytes: include_bytes!("../fonts/icons.ttf"), }; - let mut text_input = text_input( - "Type something to continue...", - value, - StepMessage::InputChanged, - ) - .padding(10) - .size(30); + let mut text_input = text_input("Type something to continue...", value) + .on_change(StepMessage::InputChanged) + .padding(10) + .size(30); if is_showing_icon { text_input = text_input.icon(text_input::Icon { -- cgit From e6a93e960c3ac71a74f11555fd2d225c185f6e8c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 12 Apr 2023 04:13:36 +0200 Subject: Rename `on_change` to `on_input` for `TextInput` --- examples/tour/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/tour') diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 3b4cfd2d..16ee19c0 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -571,7 +571,7 @@ impl<'a> Step { }; let mut text_input = text_input("Type something to continue...", value) - .on_change(StepMessage::InputChanged) + .on_input(StepMessage::InputChanged) .padding(10) .size(30); -- cgit