fix: hide field & add field tests (#1340)

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Nathan.fooo 2022-10-23 15:05:06 +08:00 committed by GitHub
parent aa8addf4a3
commit 87247ccd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,8 @@ class _GridFieldNotifier extends ChangeNotifier {
List<GridFieldContext> _fieldContexts = [];
set fieldContexts(List<GridFieldContext> fieldContexts) {
_fieldContexts = fieldContexts;
_fieldContexts =
fieldContexts.where((element) => element.visibility).toList();
notifyListeners();
}

View File

@ -1,12 +1,10 @@
use crate::editor::document::Document;
use bytes::Bytes;
use flowy_error::FlowyResult;
use lib_ot::core::{
AttributeHashMap, Body, Changeset, Extension, NodeData, NodeId, NodeOperation, NodeTree, NodeTreeContext, Path,
Selection, Transaction,
};
use lib_ot::text_delta::DeltaTextOperations;
use serde::de::{self, MapAccess, Unexpected, Visitor};
use serde::ser::{SerializeMap, SerializeSeq};

View File

@ -474,6 +474,7 @@ impl FieldChangesetParams {
|| self.frozen.is_some()
|| self.type_option_data.is_some()
|| self.frozen.is_some()
|| self.visibility.is_some()
|| self.width.is_some()
}
}