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.

tempfix: rows misfire temp fix

ascarbek6e24af9c6808
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/database-hooks/useDatabase.ts b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/database-hooks/useDatabase.ts
index 4f5d013b13..348d1bac30 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/database-hooks/useDatabase.ts
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/database-hooks/useDatabase.ts
@@ -56,7 +56,15 @@ export const useDatabase = (viewId: string, type?: ViewLayoutTypePB) => {
void loadFields(fieldInfos);
},
});
- await controller.open();
+
+ const openResult = await controller.open();
+ if (openResult.ok) {
+ setRows(
+ openResult.val.map((pb) => {
+ return new RowInfo(viewId, controller.fieldController.fieldInfos, pb);
+ })
+ );
+ }
if (type === ViewLayoutTypePB.Board) {
const fieldId = await controller.getGroupByFieldId();
diff --git a/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/database_controller.ts b/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/database_controller.ts
index 1f72104b42..f1b181667c 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/database_controller.ts
+++ b/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/database_controller.ts
@@ -65,7 +65,9 @@ export class DatabaseController {
this.databaseViewCache.initializeWithRows(database.rows);
this._callback?.onViewChanged?.(database);
- return loadGroupResult;
+
+ // temporary fix for grid rows misfire issue
+ return Ok(database.rows);
} else {
return Err(openDatabaseResult.val);
}