diff --git a/crates/ui/src/input/input.rs b/crates/ui/src/input/input.rs index 2c3c0a10..096396e1 100644 --- a/crates/ui/src/input/input.rs +++ b/crates/ui/src/input/input.rs @@ -261,6 +261,11 @@ impl TextInput { self } + /// Set the placeholder text without ownership. + pub fn set_placeholder(&mut self, placeholder: impl Into) { + self.placeholder = placeholder.into(); + } + /// Set true to show the clear button when the input field is not empty. pub fn cleanable(mut self, cleanable: bool) -> Self { self.cleanable = cleanable;