mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
SP-1189-Fix tapping ok and nothing happening bug by taking the action out of the widget.
This commit is contained in:
@ -16,9 +16,11 @@ import 'package:syncrow_web/utils/style.dart';
|
||||
class SidebarWidget extends StatefulWidget {
|
||||
final List<CommunityModel> communities;
|
||||
final String? selectedSpaceUuid;
|
||||
final void Function(String name, String description) onCreateCommunity;
|
||||
|
||||
const SidebarWidget({
|
||||
required this.communities,
|
||||
required this.onCreateCommunity,
|
||||
this.selectedSpaceUuid,
|
||||
super.key,
|
||||
});
|
||||
@ -195,11 +197,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
builder: (context) => CreateCommunityDialog(
|
||||
isEditMode: false,
|
||||
existingCommunityNames: widget.communities.map((e) => e.name).toList(),
|
||||
onCreateCommunity: (name, description) {
|
||||
context.read<SpaceManagementBloc>().add(
|
||||
CreateCommunityEvent(name, description, context),
|
||||
);
|
||||
},
|
||||
onCreateCommunity: widget.onCreateCommunity,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user