Moved focus to states

This commit is contained in:
veeso
2021-03-04 20:06:59 +01:00
parent 135d947c39
commit 2692041329
4 changed files with 54 additions and 36 deletions

View File

@@ -114,4 +114,14 @@ pub trait Component {
/// The component must provide to the supervisor whether it should be umounted (destroyed)
/// This makes sense to be called after an `on` or after an `update`, where the states changes.
fn should_umount(&self) -> bool;
/// ### blur
///
/// Blur component; basically remove focus
fn blur(&mut self);
/// ### active
///
/// Active component; basically give focus
fn active(&mut self);
}