fix skipping to confirm settings when duplicating config (#454)

This commit is contained in:
sua yoo 2023-01-12 13:57:59 -08:00 committed by GitHub
parent 875364c05a
commit 52d9ae9661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,8 +519,6 @@ export class CrawlConfigEditor extends LiteElement {
} }
private renderFooter({ isFirst = false, isLast = false }) { private renderFooter({ isFirst = false, isLast = false }) {
const isConfirmSettingsEnabled =
this.progressState.tabs.crawlSetup.completed;
return html` return html`
<div class="px-6 py-4 border-t flex justify-between"> <div class="px-6 py-4 border-t flex justify-between">
${isFirst ${isFirst
@ -588,13 +586,14 @@ export class CrawlConfigEditor extends LiteElement {
<sl-button <sl-button
size="small" size="small"
@click=${() => { @click=${() => {
if (!isConfirmSettingsEnabled) { if (this.hasRequiredFields()) {
this.nextStep();
} else {
this.updateProgressState({ this.updateProgressState({
activeTab: "confirmSettings", activeTab: "confirmSettings",
currentStep: "confirmSettings", currentStep: "confirmSettings",
tabs: { crawlSetup: { completed: true } },
}); });
} else {
this.nextStep();
} }
}} }}
> >