@@ -37,7 +37,12 @@ public struct SirioFiltriChips: View {
3737 HStack {
3838 OverflowLayout ( ) {
3939 ForEach ( texts, id: \. self) { text in
40- SirioChipsSelection ( text: text, isSelected: . constant( text == selectedType) , isDisabled: $isDisabled, accessibilityLabel: accessibilityLabel)
40+ SirioChipsSelection ( text: text, isSelected: Binding (
41+ get: { selectedType == text } ,
42+ set: { newValue in
43+ selectedType = newValue ? text : nil
44+ }
45+ ) , isDisabled: $isDisabled, accessibilityLabel: accessibilityLabel)
4146 . padding ( . vertical, Size . Filtri. paddingVerticalChips)
4247 }
4348 }
@@ -58,7 +63,12 @@ public struct SirioFiltriChips: View {
5863 ScrollView ( . horizontal, showsIndicators: false , content: {
5964 HStack {
6065 ForEach ( texts, id: \. self) { text in
61- SirioChipsSelection ( text: text, isSelected: . constant( text == selectedType) , isDisabled: $isDisabled, accessibilityLabel: accessibilityLabel)
66+ SirioChipsSelection ( text: text, isSelected: Binding (
67+ get: { selectedType == text } ,
68+ set: { newValue in
69+ selectedType = newValue ? text : nil
70+ }
71+ ) , isDisabled: $isDisabled, accessibilityLabel: accessibilityLabel)
6272 . padding ( . vertical, Size . Filtri. paddingVerticalChips)
6373 }
6474 }
0 commit comments