CB-3326 outdate alias (#1639)

This commit is contained in:
alex
2023-05-03 18:51:45 +03:00
committed by GitHub
parent 67b9c327fb
commit ddee022ea0
2 changed files with 10 additions and 1 deletions
@@ -35,6 +35,15 @@ export class DBObjectResource extends CachedMapResource<string, DBObject> {
// this.preloadResource(this.navNodeInfoResource);
this.navNodeInfoResource.outdateResource(this);
this.navNodeInfoResource.deleteInResource(this);
this.navTreeResource.onDataUpdate.addHandler(key => {
ResourceKeyUtils.forEach(key, nodeId => {
if (!isResourceAlias(nodeId)) {
this.markOutdated(DBObjectParentKey(nodeId));
}
});
});
this.beforeLoad.addHandler(async (originalKey, context) => {
await this.navTreeResource.waitLoad();
if (this.isAlias(originalKey, DBObjectParentKey)) {
@@ -103,7 +103,7 @@ export const Table = observer<Props>(function Table({
.sort((a, b) => (b.object?.properties?.length || 0) - (a.object?.properties?.length || 0));
const nodeIds = objects.map(object => object.id);
const properties = baseObject[0].object?.properties ?? [];
const properties = baseObject[0]?.object?.properties ?? [];
const measuredCells = getMeasuredCells(properties, objects);
const dataColumns: IDataColumn[] = properties.map((property, index) => ({