From 91f7d4a8e02eb644ca2368a3ceb92510c2ea4b35 Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Mon, 29 Jul 2024 15:20:41 +0800 Subject: [PATCH] expose TextInput::disabled --- 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); }