Skip to content

Commit

Permalink
fix: loading tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clragon committed Jan 11, 2024
1 parent 57c8021 commit 56de762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/common/box/suggestions_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ class _SuggestionsListState<T> extends State<SuggestionsList<T>> {

bool isError = widget.controller.hasError;
bool isEmpty = suggestions?.isEmpty ?? false;
bool isLoading =
widget.controller.isLoading && (isEmpty || !retainOnLoading);
bool isLoading = widget.controller.isLoading &&
(suggestions == null || isEmpty || !retainOnLoading);

if (isLoading) {
if (widget.hideOnLoading ?? false) return const SizedBox();
Expand Down

0 comments on commit 56de762

Please sign in to comment.