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/qr_code/src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'examples/qr_code') diff --git a/examples/qr_code/src/main.rs b/examples/qr_code/src/main.rs index d8041745..0486b068 100644 --- a/examples/qr_code/src/main.rs +++ b/examples/qr_code/src/main.rs @@ -49,13 +49,11 @@ impl Sandbox for QRGenerator { .size(70) .style(Color::from([0.5, 0.5, 0.5])); - let input = text_input( - "Type the data of your QR code here...", - &self.data, - Message::DataChanged, - ) - .size(30) - .padding(15); + let input = + text_input("Type the data of your QR code here...", &self.data) + .on_change(Message::DataChanged) + .size(30) + .padding(15); let mut content = column![title, input] .width(700) -- 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/qr_code/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/qr_code') diff --git a/examples/qr_code/src/main.rs b/examples/qr_code/src/main.rs index 0486b068..867ebfa4 100644 --- a/examples/qr_code/src/main.rs +++ b/examples/qr_code/src/main.rs @@ -51,7 +51,7 @@ impl Sandbox for QRGenerator { let input = text_input("Type the data of your QR code here...", &self.data) - .on_change(Message::DataChanged) + .on_input(Message::DataChanged) .size(30) .padding(15); -- cgit