mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: filter UI bugs (#1489)
* chore: remove the add filter button if there is no filters can not be added * fix: update field info after filter was changed * chore: update filter choicechip ui * chore: insert and delete one by one to keep the delete/insert index is right * chore: show filter after creating the default filter * chore: update textfield_tags version to calm the warnings * chore: try to fix potential fails on backend test Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
@ -206,8 +206,8 @@ impl GridFilterTest {
|
||||
let mut receiver = self.editor.subscribe_view_changed(&self.grid_id).await.unwrap();
|
||||
match tokio::time::timeout(Duration::from_secs(2), receiver.recv()).await {
|
||||
Ok(changed) => match changed.unwrap() { GridViewChanged::DidReceiveFilterResult(changed) => {
|
||||
assert_eq!(changed.visible_rows.len(), visible_row_len);
|
||||
assert_eq!(changed.invisible_rows.len(), hide_row_len);
|
||||
assert_eq!(changed.visible_rows.len(), visible_row_len, "visible rows not match");
|
||||
assert_eq!(changed.invisible_rows.len(), hide_row_len, "invisible rows not match");
|
||||
} },
|
||||
Err(e) => {
|
||||
panic!("Process task timeout: {:?}", e);
|
||||
|
@ -98,20 +98,16 @@ async fn grid_filter_single_select_is_test2() {
|
||||
row_index: 1,
|
||||
option_id: option.id.clone(),
|
||||
},
|
||||
AssertFilterChanged {
|
||||
visible_row_len: 1,
|
||||
hide_row_len: 0,
|
||||
},
|
||||
AssertNumberOfVisibleRows { expected: 3 },
|
||||
UpdateSingleSelectCell {
|
||||
row_index: 1,
|
||||
option_id: "".to_string(),
|
||||
},
|
||||
// AssertFilterChanged {
|
||||
// visible_row_len: 0,
|
||||
// hide_row_len: 1,
|
||||
// },
|
||||
// AssertNumberOfVisibleRows { expected: 2 },
|
||||
AssertFilterChanged {
|
||||
visible_row_len: 0,
|
||||
hide_row_len: 1,
|
||||
},
|
||||
AssertNumberOfVisibleRows { expected: 2 },
|
||||
];
|
||||
test.run_scripts(scripts).await;
|
||||
}
|
||||
|
Reference in New Issue
Block a user