Skip to content

Commit

Permalink
Fixed QA issue
Browse files Browse the repository at this point in the history
  • Loading branch information
elsoazemelet committed Apr 9, 2024
1 parent 2e638e4 commit 7c4d4e1
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/routes/EditorLayout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -249,25 +249,21 @@
filteredConfigs = configs;
isFiltering = e.detail.isFiltering;
selectedConfigIndex = filteredConfigs.findIndex((e) => e.id === selectedConfigId);
let category = undefined;
if (filteredConfigs.length > 0) {
if (selectedConfigIndex == -1) {
selectedConfigIndex = 0;
selectedConfigId = filteredConfigs[0].id;
const category = getConfigCategory(filteredConfigs[0]);
accordionKey = category;
category = getConfigCategory(filteredConfigs[0]);
} else {
const config = filteredConfigs.find((e) => e.id === selectedConfigId);
category = getConfigCategory(config);
}
} else {
selectedConfigId = undefined;
accordionKey = undefined;
}
}
$: {
if (!isFiltering && accordionKey === "other_configs") {
const config = filteredConfigs.find((e) => e.id === selectedConfigId);
const category = getConfigCategory(config);
accordionKey = category;
}
accordionKey = category;
}
onMount(async () => {
Expand Down

0 comments on commit 7c4d4e1

Please sign in to comment.