Skip to content

Commit 5c47314

Browse files
committed
feat(content_management): disable country dropdown when loading more
- Add helper text to show loading status in country dropdown - Disable country selection when more countries are being loaded
1 parent 4a5db96 commit 5c47314

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/content_management/view/edit_headline_page.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ class _EditHeadlineViewState extends State<_EditHeadlineView> {
287287
decoration: InputDecoration(
288288
labelText: l10n.countryName,
289289
border: const OutlineInputBorder(),
290+
helperText: state.countriesIsLoadingMore
291+
? l10n.loadingFullList
292+
: null,
290293
),
291294
items: [
292295
DropdownMenuItem(value: null, child: Text(l10n.none)),
@@ -313,9 +316,11 @@ class _EditHeadlineViewState extends State<_EditHeadlineView> {
313316
),
314317
),
315318
],
316-
onChanged: (value) => context
317-
.read<EditHeadlineBloc>()
318-
.add(EditHeadlineCountryChanged(value)),
319+
onChanged: state.countriesIsLoadingMore
320+
? null
321+
: (value) => context
322+
.read<EditHeadlineBloc>()
323+
.add(EditHeadlineCountryChanged(value)),
319324
),
320325
const SizedBox(height: AppSpacing.lg),
321326
DropdownButtonFormField<ContentStatus>(

0 commit comments

Comments
 (0)