Skip to content

Commit 1cfc3e2

Browse files
committed
feat(content_management): disable country selection when loading more
- Add helper text to indicate loading state in country dropdown - Disable country selection when more countries are being loaded
1 parent fd7f540 commit 1cfc3e2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/content_management/view/create_headline_page.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ class _CreateHeadlineViewState extends State<_CreateHeadlineView> {
219219
decoration: InputDecoration(
220220
labelText: l10n.countryName,
221221
border: const OutlineInputBorder(),
222+
helperText: state.countriesIsLoadingMore
223+
? l10n.loadingFullList
224+
: null,
222225
),
223226
items: [
224227
DropdownMenuItem(value: null, child: Text(l10n.none)),
@@ -245,9 +248,11 @@ class _CreateHeadlineViewState extends State<_CreateHeadlineView> {
245248
),
246249
),
247250
],
248-
onChanged: (value) => context
249-
.read<CreateHeadlineBloc>()
250-
.add(CreateHeadlineCountryChanged(value)),
251+
onChanged: state.countriesIsLoadingMore
252+
? null
253+
: (value) => context
254+
.read<CreateHeadlineBloc>()
255+
.add(CreateHeadlineCountryChanged(value)),
251256
),
252257
const SizedBox(height: AppSpacing.lg),
253258
DropdownButtonFormField<ContentStatus>(

0 commit comments

Comments
 (0)