Skip to content

Commit 0188a8f

Browse files
committed
Fixes the bug: when creating a new Knowledge Base, the Contents tab is not selected
1 parent eb0f948 commit 0188a8f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/app/knowledge-bases/knowledge-bases.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,13 @@ export class KnowledgeBasesComponent extends PricingBaseComponent implements OnI
12231223
this.getChatbotUsingNamespace(this.selectedNamespace.id)
12241224

12251225
this.selectedNamespaceName = namespace['name']
1226-
this.router.navigate(['project/' + this.project._id + '/knowledge-bases/' + this.selectedNamespace.id]);
1226+
if (this.selectedTab === 'unanswered') {
1227+
this.switchTab('contents');
1228+
}
1229+
this.router.navigate(
1230+
['project/' + this.project._id + '/knowledge-bases/' + this.selectedNamespace.id],
1231+
{ queryParams: { tab: null, questionsSub: null }, queryParamsHandling: 'merge', replaceUrl: true }
1232+
);
12271233

12281234
// this.logger.log('[KNOWLEDGE-BASES-COMP] CREATE NEW NAMESPACE selectedNamespaceName', this.selectedNamespaceName)
12291235
// this.selectedNamespaceID = namespace['id'];

0 commit comments

Comments
 (0)