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.

feat: horizontal scroll on multiselect options (#1282)

Chirag Bargoojardf91e0098581
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
index 7586709f2c..9fd16c8f5d 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
@@ -3,6 +3,7 @@ import 'dart:collection';
import 'package:flowy_infra/size.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_sdk/protobuf/flowy-grid/select_type_option.pb.dart';
+import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:app_flowy/generated/locale_keys.g.dart';
@@ -170,10 +171,21 @@ class _SelectOptionTextFieldState extends State<SelectOptionTextField> {
.toList();
return Padding(
padding: const EdgeInsets.all(8.0),
- child: SingleChildScrollView(
- controller: sc,
- scrollDirection: Axis.horizontal,
- child: Wrap(spacing: 4, children: children),
+ child: ScrollConfiguration(
+ behavior: ScrollConfiguration.of(context).copyWith(
+ dragDevices: {
+ PointerDeviceKind.mouse,
+ PointerDeviceKind.touch,
+ PointerDeviceKind.trackpad,
+ PointerDeviceKind.stylus,
+ PointerDeviceKind.invertedStylus,
+ },
+ ),
+ child: SingleChildScrollView(
+ controller: sc,
+ scrollDirection: Axis.horizontal,
+ child: Wrap(spacing: 4, children: children),
+ ),
),
);
}