mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 20:54:54 +00:00
@ -1,3 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/space_tree/bloc/space_tree_bloc.dart';
|
||||
@ -10,7 +14,6 @@ class DropdownMenuContent extends StatefulWidget {
|
||||
final VoidCallback onClose;
|
||||
|
||||
const DropdownMenuContent({
|
||||
super.key,
|
||||
required this.selectedSpaceId,
|
||||
required this.onChanged,
|
||||
required this.onClose,
|
||||
@ -42,7 +45,7 @@ class _DropdownMenuContentState extends State<DropdownMenuContent> {
|
||||
final state = bloc.state;
|
||||
if (_scrollController.position.pixels >=
|
||||
_scrollController.position.maxScrollExtent - 30) {
|
||||
if (!state.paginationIsLoading) {
|
||||
if (state is SpaceTreeState && !state.paginationIsLoading) {
|
||||
bloc.add(PaginationEvent(state.paginationModel, state.communityList));
|
||||
}
|
||||
}
|
||||
@ -123,7 +126,7 @@ class _DropdownMenuContentState extends State<DropdownMenuContent> {
|
||||
_searchController.text.isEmpty
|
||||
? context
|
||||
.read<SpaceTreeBloc>()
|
||||
.add(const SearchQueryEvent(''))
|
||||
.add(SearchQueryEvent(''))
|
||||
: context.read<SpaceTreeBloc>().add(
|
||||
SearchQueryEvent(_searchController.text));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user