Skip to content

Commit 582ae37

Browse files
committed
fix(ui): unable to select presets, sequences or groups when more than 42 items in list
1 parent c932565 commit 582ae37

File tree

3 files changed

+35
-29
lines changed

3 files changed

+35
-29
lines changed

crates/ui/lib/panes/programmer/dialogs/select_preset_dialog.dart

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ class SelectPresetDialog extends StatelessWidget {
2222
content: Container(
2323
width: MAX_TILE_DIALOG_WIDTH,
2424
height: MAX_DIALOG_HEIGHT,
25-
child: PanelGrid(
26-
children: state
27-
.getByPresetType(presetType)
28-
.map((preset) => PanelGridTile.idWithText(
29-
id: preset.id.id.toString(),
30-
text: preset.label ?? "",
31-
onTap: () => Navigator.of(context).pop(preset.id)))
32-
.toList()),
25+
child: SingleChildScrollView(
26+
child: PanelGrid(
27+
children: state
28+
.getByPresetType(presetType)
29+
.map((preset) => PanelGridTile.idWithText(
30+
id: preset.id.id.toString(),
31+
text: preset.label ?? "",
32+
onTap: () => Navigator.of(context).pop(preset.id)))
33+
.toList()),
34+
),
3335
),
3436
actions: [
3537
PopupAction("Cancel", () => Navigator.of(context).pop()),

crates/ui/lib/panes/programmer/dialogs/select_sequence_dialog.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ class SelectSequenceDialog extends StatelessWidget {
1919
content: Container(
2020
width: MAX_TILE_DIALOG_WIDTH,
2121
height: MAX_DIALOG_HEIGHT,
22-
child: FutureBuilder(
23-
future: api.getSequences(),
24-
builder: (context, AsyncSnapshot<Sequences> data) {
25-
List<Sequence> sequences = data.hasData ? data.data!.sequences : [];
26-
sequences.sort((lhs, rhs) => lhs.id - rhs.id);
22+
child: SingleChildScrollView(
23+
child: FutureBuilder(
24+
future: api.getSequences(),
25+
builder: (context, AsyncSnapshot<Sequences> data) {
26+
List<Sequence> sequences = data.hasData ? data.data!.sequences : [];
27+
sequences.sort((lhs, rhs) => lhs.id - rhs.id);
2728

28-
return PanelGrid(children: sequences
29-
.map((s) => PanelGridTile.idWithText(
30-
id: s.id.toString(),
31-
text: s.name,
32-
onTap: () => Navigator.of(context).pop(s),
33-
))
34-
.toList());
35-
}),
29+
return PanelGrid(children: sequences
30+
.map((s) => PanelGridTile.idWithText(
31+
id: s.id.toString(),
32+
text: s.name,
33+
onTap: () => Navigator.of(context).pop(s),
34+
))
35+
.toList());
36+
}),
37+
),
3638
),
3739
actions: [
3840
PopupAction("Cancel", () => Navigator.of(context).pop()),

crates/ui/lib/views/patch/dialogs/assign_fixtures_to_group_dialog.dart

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,16 @@ class _AssignFixturesToGroupDialogState extends State<AssignFixturesToGroupDialo
6161
content: Container(
6262
width: MAX_TILE_DIALOG_WIDTH,
6363
height: MAX_DIALOG_HEIGHT,
64-
child: PanelGrid(
65-
children: widget.bloc.state.groups
66-
.map((g) => PanelGridTile.idWithText(
67-
id: "G${g.id}",
68-
text: g.name,
69-
onTap: () => Navigator.of(context).pop(_InternalDialogResult(g)),
70-
))
71-
.toList())),
64+
child: SingleChildScrollView(
65+
child: PanelGrid(
66+
children: widget.bloc.state.groups
67+
.map((g) => PanelGridTile.idWithText(
68+
id: "G${g.id}",
69+
text: g.name,
70+
onTap: () => Navigator.of(context).pop(_InternalDialogResult(g)),
71+
))
72+
.toList()),
73+
)),
7274
actions: [
7375
PopupAction("Cancel", () => Navigator.of(context).pop()),
7476
PopupAction("New Group", () => _newGroup(context))

0 commit comments

Comments
 (0)