mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
fixed community selection
This commit is contained in:
@ -179,8 +179,8 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
// Check if this community is selected
|
||||
return CommunityTile(
|
||||
title: community.name,
|
||||
key: ValueKey(community.uuid),
|
||||
isSelected: _selectedId == community.uuid,
|
||||
key: ValueKey(community.uuid),
|
||||
isSelected: _selectedId == community.uuid,
|
||||
isExpanded: false,
|
||||
onItemSelected: () {
|
||||
setState(() {
|
||||
@ -208,7 +208,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
// Check if space should be expanded
|
||||
return SpaceTile(
|
||||
title: space.name,
|
||||
key: ValueKey(space.uuid),
|
||||
key: ValueKey(space.uuid),
|
||||
isSelected: _selectedId == space.uuid,
|
||||
initiallyExpanded: isExpandedSpace,
|
||||
onExpansionChanged: (bool expanded) {
|
||||
@ -221,6 +221,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
_selectedCommunityUuid = community.uuid; // Update selected community
|
||||
});
|
||||
if (widget.onSpaceSelected != null) {
|
||||
widget.onCommunitySelected!(community);
|
||||
widget.onSpaceSelected!(space);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user