Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: improve look of select option list (#1168)

Richard Shiue3dc64f3d50dc
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart
index 93b0699462..3f60de4142 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart
@@ -130,14 +130,10 @@ class SelectOptionTagCell extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Flexible(
- fit: FlexFit.loose,
- flex: 2,
- child: SelectOptionTag.fromOption(
- context: context,
- option: option,
- onSelected: () => onSelected(option),
- ),
+ SelectOptionTag.fromOption(
+ context: context,
+ option: option,
+ onSelected: () => onSelected(option),
),
const Spacer(),
...children,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
index bc80798fea..1b683713a3 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
@@ -248,32 +248,25 @@ class _SelectOptionCellState extends State<_SelectOptionCell> {
mutex: widget.popoverMutex,
child: SizedBox(
height: GridSize.typeOptionItemHeight,
- child: Row(
+ child: SelectOptionTagCell(
+ option: widget.option,
+ onSelected: (option) {
+ context
+ .read<SelectOptionCellEditorBloc>()
+ .add(SelectOptionEditorEvent.selectOption(option.id));
+ },
children: [
- Flexible(
- fit: FlexFit.loose,
- child: SelectOptionTagCell(
- option: widget.option,
- onSelected: (option) {
- context
- .read<SelectOptionCellEditorBloc>()
- .add(SelectOptionEditorEvent.selectOption(option.id));
- },
- children: [
- if (widget.isSelected)
- Padding(
- padding: const EdgeInsets.only(right: 6),
- child: svgWidget("grid/checkmark"),
- ),
- ],
+ if (widget.isSelected)
+ Padding(
+ padding: const EdgeInsets.only(right: 6),
+ child: svgWidget("grid/checkmark"),
),
- ),
FlowyIconButton(
width: 30,
onPressed: () => _popoverController.show(),
iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4),
icon: svgWidget("editor/details", color: theme.iconColor),
- )
+ ),
],
),
),