Fix placeholder in multiline text input

This commit is contained in:
Erik Kundt
2023-08-22 13:29:11 +02:00
parent 1ed3c5af52
commit bd4c79f285
+3 -1
View File
@@ -73,7 +73,9 @@ impl WidgetComponent for TextInput {
let result = self.input.perform(cmd);
if let State::Vec(values) = self.input.state() {
if let Some(StateValue::String(input)) = values.first() {
self.show_placeholder = input.is_empty();
self.show_placeholder = values.len() == 1 && input.is_empty();
} else {
self.show_placeholder = false;
}
}
result