Fix workflow edit back button (#857)
This commit is contained in:
parent
da33231be9
commit
b5781c8869
@ -72,7 +72,7 @@ export class WorkflowDetail extends LiteElement {
|
|||||||
private currentCrawlStats?: Crawl["stats"];
|
private currentCrawlStats?: Crawl["stats"];
|
||||||
|
|
||||||
@state()
|
@state()
|
||||||
private activePanel?: Tab;
|
private activePanel: Tab = SECTIONS[0];
|
||||||
|
|
||||||
@state()
|
@state()
|
||||||
private isLoading: boolean = false;
|
private isLoading: boolean = false;
|
||||||
@ -156,7 +156,11 @@ export class WorkflowDetail extends LiteElement {
|
|||||||
) {
|
) {
|
||||||
this.handleCrawlRunEnd();
|
this.handleCrawlRunEnd();
|
||||||
}
|
}
|
||||||
if (changedProperties.has("activePanel") && this.activePanel) {
|
if (
|
||||||
|
!this.isEditing &&
|
||||||
|
changedProperties.has("activePanel") &&
|
||||||
|
this.activePanel
|
||||||
|
) {
|
||||||
if (!this.isPanelHeaderVisible) {
|
if (!this.isPanelHeaderVisible) {
|
||||||
// Scroll panel header into view
|
// Scroll panel header into view
|
||||||
this.querySelector("btrix-tab-list")?.scrollIntoView({
|
this.querySelector("btrix-tab-list")?.scrollIntoView({
|
||||||
@ -170,7 +174,8 @@ export class WorkflowDetail extends LiteElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getActivePanelFromHash = () => {
|
private getActivePanelFromHash = async () => {
|
||||||
|
await this.updateComplete;
|
||||||
if (this.isEditing) return;
|
if (this.isEditing) return;
|
||||||
|
|
||||||
const hashValue = window.location.hash.slice(1);
|
const hashValue = window.location.hash.slice(1);
|
||||||
@ -391,7 +396,7 @@ export class WorkflowDetail extends LiteElement {
|
|||||||
></sl-icon>
|
></sl-icon>
|
||||||
<span class="inline-block align-middle"
|
<span class="inline-block align-middle"
|
||||||
>${workflowId
|
>${workflowId
|
||||||
? msg(str`Back to ${this.renderName()}`)
|
? msg(html`Back to ${this.renderName()}`)
|
||||||
: msg("Back to Crawl Workflows")}</span
|
: msg("Back to Crawl Workflows")}</span
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user