tempfix: rows misfire temp fix

This commit is contained in:
ascarbek 2023-03-24 18:24:28 +06:00
parent 6f4b11f468
commit 6e24af9c68
2 changed files with 12 additions and 2 deletions

View File

@ -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();

View File

@ -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);
}