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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: consider simple table in exclude table types (#7478)
Richard Shiuea0ae62d6f502
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/toolbar_extension.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/toolbar_extension.dartindex ebbfb27db6..aed78172b2 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/toolbar_extension.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/toolbar_extension.dart@@ -1,5 +1,10 @@+import 'package:appflowy/plugins/document/presentation/editor_plugins/simple_table/simple_table.dart';import 'package:appflowy_editor/appflowy_editor.dart';+bool _isTableType(String type) {+ return [TableBlockKeys.type, SimpleTableBlockKeys.type].contains(type);+}+bool notShowInTable(EditorState editorState) {final selection = editorState.selection;if (selection == null) {@@ -7,12 +12,12 @@ bool notShowInTable(EditorState editorState) {}final nodes = editorState.getNodesInSelection(selection);return nodes.every((element) {- if (element.type == TableBlockKeys.type) {+ if (_isTableType(element.type)) {return false;}var parent = element.parent;while (parent != null) {- if (parent.type == TableBlockKeys.type) {+ if (_isTableType(parent.type)) {return false;}parent = parent.parent;diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lockindex 09e6287908..fc04deae5b 100644--- a/frontend/appflowy_flutter/pubspec.lock+++ b/frontend/appflowy_flutter/pubspec.lock@@ -1583,10 +1583,10 @@ packages:dependency: transitivedescription:name: pdf- sha256: adbdec5bc84d20e6c8d67f9c64270aa64d1e9e1ed529f0fef7e7bc7e9400f894+ sha256: "28eacad99bffcce2e05bba24e50153890ad0255294f4dd78a17075a2ba5c8416"url: "https://pub.dev"source: hosted- version: "3.11.2"+ version: "3.11.3"percent_indicator:dependency: "direct main"description: