Skip to content

Commit

Permalink
Merge pull request #4095 from systeminit/victor/back-to-asset-funcs
Browse files Browse the repository at this point in the history
fix: Clicking on asset with sub func selected takes you back to asset func
  • Loading branch information
vbustamante authored Jul 5, 2024
2 parents c7b22d9 + 4a92d1a commit 23616de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/web/src/store/asset.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,20 @@ export const useAssetStore = () => {
}
},
setSchemaVariantSelection(id: SchemaVariantId, forceCode?: boolean) {
this.setFuncSelection(undefined);

if (
this.selectedSchemaVariants.length === 1 &&
this.selectedSchemaVariants[0] === id
) {
return; // no-op
return;
}
if (!this.selectedSchemaVariants.includes(id)) {
this.selectedFuncs = [];
}
this.selectedSchemaVariants = [id];
this.syncSelectionIntoUrl();
this.LOAD_SCHEMA_VARIANT(id, forceCode);
// no last selected func
funcsStore.selectedFuncId = undefined;
},
async setFuncSelection(id?: FuncId) {
// ignore the old func selections and replace with one func or no funcs
Expand Down

0 comments on commit 23616de

Please sign in to comment.