fix: Fix the default article sidebar state (#6191)

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2023-01-10 09:46:53 +05:30
committed by GitHub
parent ffb4bd0109
commit 817ec4c50f
3 changed files with 7 additions and 4 deletions

View File

@@ -113,6 +113,10 @@ const { ARTICLE_STATUS_TYPES } = wootConstants;
export default { export default {
mixins: [alertMixin, clickaway], mixins: [alertMixin, clickaway],
props: { props: {
isSidebarOpen: {
type: Boolean,
default: true,
},
backButtonLabel: { backButtonLabel: {
type: String, type: String,
default: '', default: '',
@@ -136,10 +140,9 @@ export default {
}, },
data() { data() {
return { return {
isSidebarOpen: false,
showActionsDropdown: false, showActionsDropdown: false,
alertMessage: '', alertMessage: '',
ARTICLE_STATUS_TYPES: ARTICLE_STATUS_TYPES, ARTICLE_STATUS_TYPES,
}; };
}, },
computed: { computed: {
@@ -205,11 +208,9 @@ export default {
} }
}, },
openSidebar() { openSidebar() {
this.isSidebarOpen = true;
this.$emit('open'); this.$emit('open');
}, },
closeSidebar() { closeSidebar() {
this.isSidebarOpen = false;
this.$emit('close'); this.$emit('close');
}, },
openActionsDropdown() { openActionsDropdown() {

View File

@@ -8,6 +8,7 @@
:back-button-label="$t('HELP_CENTER.HEADER.TITLES.ALL_ARTICLES')" :back-button-label="$t('HELP_CENTER.HEADER.TITLES.ALL_ARTICLES')"
:is-updating="isUpdating" :is-updating="isUpdating"
:is-saved="isSaved" :is-saved="isSaved"
:is-sidebar-open="showArticleSettings"
@back="onClickGoBack" @back="onClickGoBack"
@open="openArticleSettings" @open="openArticleSettings"
@close="closeArticleSettings" @close="closeArticleSettings"

View File

@@ -7,6 +7,7 @@
<edit-article-header <edit-article-header
:back-button-label="$t('HELP_CENTER.HEADER.TITLES.ALL_ARTICLES')" :back-button-label="$t('HELP_CENTER.HEADER.TITLES.ALL_ARTICLES')"
draft-state="saved" draft-state="saved"
:is-sidebar-open="showArticleSettings"
@back="onClickGoBack" @back="onClickGoBack"
@open="openArticleSettings" @open="openArticleSettings"
@close="closeArticleSettings" @close="closeArticleSettings"