Forms · NumberInput label: the name assistive technology reads, drawn nowhere
This commit is contained in:
3 files changed
+22
No files matched your search
@@ -204,6 +204,10 @@ impl TextInput {
|
||||
&self.placeholder
|
||||
}
|
||||
|
||||
pub fn label_text(&self) -> &SharedString {
|
||||
&self.label
|
||||
}
|
||||
|
||||
pub fn selection(&self) -> Range<usize> {
|
||||
self.selection.clone()
|
||||
}
|
||||
@@ -221,6 +225,11 @@ impl TextInput {
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn set_label(&mut self, text: impl Into<SharedString>, cx: &mut Context<Self>) {
|
||||
self.label = text.into();
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn set_masked(&mut self, masked: bool, cx: &mut Context<Self>) {
|
||||
self.masked = masked;
|
||||
cx.notify();
|
||||
|
||||
Reference in new issue
Block a user