Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/components/NcAppSidebar/NcAppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export default {
<template>
<Fragment>
<!-- With vue3 we can move this inside the transition, but vue2 does not allow v-show in transition -->
<NcButton v-if="!open"
<NcButton v-if="!open && !noToggle"
:aria-label="t('Open sidebar')"
class="app-sidebar__toggle"
:class="toggleClasses"
Expand Down Expand Up @@ -763,10 +763,10 @@ export default {
/**
* Allow to conditionally show the sidebar
* You can also use `v-if` on the sidebar, but using the open prop allow to keep
* the sidebar inside the DOM for performance if it is opened and closed multple times.
* the sidebar inside the DOM for performance if it is opened and closed multiple times.
*
* When using the `open` property to close the sidebar a built-in toggle button will be shown to reopen it,
* similar to the app navigation.
* similar to the app navigation. You can remove this button with the `no-toggle` prop.
*/
open: {
type: Boolean,
Expand All @@ -789,6 +789,14 @@ export default {
type: Object,
default: undefined,
},

/**
* Do not add the built-in toggle button with `open` prop.
*/
noToggle: {
type: Boolean,
default: false,
},
},

emits: [
Expand Down