From 6e58edd3495db9d0055f3f19a94cd9414beca264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E5=B3=B0?= Date: Mon, 29 Jul 2024 18:51:46 +0800 Subject: [PATCH] input: Expose TextInput::disabled (#81) --- crates/ui/src/input/input.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui/src/input/input.rs b/crates/ui/src/input/input.rs index 7d70aad8..b6427320 100644 --- a/crates/ui/src/input/input.rs +++ b/crates/ui/src/input/input.rs @@ -296,6 +296,10 @@ impl TextInput { self.text.clone() } + pub fn disabled(&self) -> bool { + self.disabled + } + pub fn focus(&self, cx: &mut ViewContext) { self.focus_handle.focus(cx); }