feat(segmented-button): configurable close icons

This commit is contained in:
Michael Aaron Murphy 2023-02-13 15:57:30 +01:00 committed by Jeremy Soller
parent 843919e44f
commit 4fa61eeafd
10 changed files with 288 additions and 64 deletions

View file

@ -33,8 +33,10 @@ impl Selectable for Model<SingleSelect> {
self.selection.active = id;
}
fn deactivate(&mut self, _id: Entity) {
self.selection.active = Entity::default();
fn deactivate(&mut self, id: Entity) {
if id == self.selection.active {
self.selection.active = Entity::default();
}
}
fn is_active(&self, id: Entity) -> bool {