mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
tempfix: rows misfire temp fix
This commit is contained in:
parent
6f4b11f468
commit
6e24af9c68
@ -56,7 +56,15 @@ export const useDatabase = (viewId: string, type?: ViewLayoutTypePB) => {
|
|||||||
void loadFields(fieldInfos);
|
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) {
|
if (type === ViewLayoutTypePB.Board) {
|
||||||
const fieldId = await controller.getGroupByFieldId();
|
const fieldId = await controller.getGroupByFieldId();
|
||||||
|
@ -65,7 +65,9 @@ export class DatabaseController {
|
|||||||
this.databaseViewCache.initializeWithRows(database.rows);
|
this.databaseViewCache.initializeWithRows(database.rows);
|
||||||
|
|
||||||
this._callback?.onViewChanged?.(database);
|
this._callback?.onViewChanged?.(database);
|
||||||
return loadGroupResult;
|
|
||||||
|
// temporary fix for grid rows misfire issue
|
||||||
|
return Ok(database.rows);
|
||||||
} else {
|
} else {
|
||||||
return Err(openDatabaseResult.val);
|
return Err(openDatabaseResult.val);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user