feat: expand sections when filter is toggled (#33077)

This commit is contained in:
Florian Duros
2026-04-09 13:14:41 +00:00
committed by GitHub
parent 60a7a22c7b
commit a5e09ebb53
2 changed files with 37 additions and 0 deletions
@@ -182,6 +182,16 @@ export class RoomListViewModel
// Update roomsMap immediately before clearing VMs
this.updateRoomsMap(this.roomsResult);
// When a filter is toggled on, expand sections that have results so they're visible
if (newFilter) {
for (const section of this.roomsResult.sections) {
if (section.rooms.length > 0) {
const sectionHeaderVM = this.roomSectionHeaderViewModels.get(section.tag);
if (sectionHeaderVM) sectionHeaderVM.isExpanded = true;
}
}
}
this.updateRoomListData();
};