fix: fix exclusion of cells
This commit is contained in:
parent
73abd949eb
commit
95fc92dfca
|
|
@ -34,7 +34,6 @@ public protocol FilterViewModelProtocol: AnyObject {
|
|||
|
||||
func filterDidSelected(atIndexPath indexPath: IndexPath) -> [Change]
|
||||
func toggleProperty(atIndexPath indexPath: IndexPath) -> (selected: [Property], deselected: [Property])
|
||||
// func getCellsViewModels() -> [CellViewModel]
|
||||
}
|
||||
|
||||
public extension FilterViewModelProtocol {
|
||||
|
|
|
|||
|
|
@ -37,16 +37,6 @@ open class DefaultFilterCollectionCell: ContainerCollectionViewCell<UILabel>,
|
|||
"default-filter-cell"
|
||||
}
|
||||
|
||||
open override var isSelected: Bool {
|
||||
didSet {
|
||||
if isSelected {
|
||||
setSelectedAppearance()
|
||||
} else {
|
||||
setDeselectAppearance()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open override func configureAppearance() {
|
||||
super.configureAppearance()
|
||||
|
||||
|
|
@ -63,7 +53,15 @@ open class DefaultFilterCollectionCell: ContainerCollectionViewCell<UILabel>,
|
|||
|
||||
wrappedView.text = viewModel.title
|
||||
|
||||
isSelected = viewModel.isSelected
|
||||
setSelected(viewModel.isSelected)
|
||||
}
|
||||
|
||||
open func setSelected(_ isSelected: Bool) {
|
||||
if isSelected {
|
||||
setSelectedAppearance()
|
||||
} else {
|
||||
setDeselectAppearance()
|
||||
}
|
||||
}
|
||||
|
||||
open func setSelectedAppearance() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue