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.

chore: remove unavailable action of GridSettingAction and RowAction

appflowyb28627610856
diff --git a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_action_sheet.dart b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_action_sheet.dart
index 40e77d9c43..1d7886c86c 100644
--- a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_action_sheet.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_action_sheet.dart
@@ -24,6 +24,7 @@ class GridRowActionSheet extends StatelessWidget {
child: BlocBuilder<RowActionSheetBloc, RowActionSheetState>(
builder: (context, state) {
final cells = _RowAction.values
+ .where((value) => value.enable())
.map(
(action) => _RowActionCell(
action: action,
diff --git a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/toolbar/grid_setting.dart b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/toolbar/grid_setting.dart
index 05a72a5504..7e3c14e021 100644
--- a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/toolbar/grid_setting.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/toolbar/grid_setting.dart
@@ -85,7 +85,7 @@ class GridSettingList extends StatelessWidget {
}
Widget _renderList() {
- final cells = GridSettingAction.values.map((action) {
+ final cells = GridSettingAction.values.where((value) => value.enable()).map((action) {
return _SettingItem(action: action);
}).toList();