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

View File

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

View File

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