Browse Source

fix: don't delete the property if it shouldn't be allowed (#1633)

Richard Shiue 2 years ago
parent
commit
c5b15daac4

+ 3 - 1
frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart

@@ -218,7 +218,9 @@ class _DeleteFieldButton extends StatelessWidget {
             LocaleKeys.grid_field_delete.tr(),
             color: enable ? null : Theme.of(context).disabledColor,
           ),
-          onTap: () => onDeleted?.call(),
+          onTap: () {
+            if (enable) onDeleted?.call();
+          },
           onHover: (_) => popoverMutex.close(),
         );
         return Padding(