Skip to content

Commit

Permalink
feat(QDrawer): add prop to disable mini animation (#15670)
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Apr 27, 2023
1 parent 0858ff5 commit 557ffd8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions ui/dev/src/pages/layout/layout-drawer-mini.vue
@@ -1,7 +1,7 @@
<template>
<div class="q-layout-padding">
<q-toggle v-model="disableMiniAnimation">
Disable mini animation
<q-toggle v-model="noMiniAnimation">
No mini animation
</q-toggle>
<q-toggle v-model="miniToOverlay">
Mini to overlay
Expand All @@ -21,7 +21,7 @@
:mini="miniState"
:mini-to-overlay="miniToOverlay"
:width="200"
:disable-mini-animation="disableMiniAnimation"
:no-mini-animation="noMiniAnimation"
:breakpoint="0"
bordered
>
Expand Down Expand Up @@ -90,7 +90,7 @@ export default {
miniToOverlay: true,
width: 1030,
contentSize: 30,
disableMiniAnimation: false
noMiniAnimation: false
}
},
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/drawer/QDrawer.js
Expand Up @@ -41,7 +41,7 @@ export default createComponent({
type: Number,
default: 57
},
disableMiniAnimation: Boolean,
noMiniAnimation: Boolean,

breakpoint: {
type: Number,
Expand Down Expand Up @@ -418,7 +418,7 @@ export default createComponent({
watch(() => $q.lang.rtl, () => { applyPosition() })

watch(() => props.mini, () => {
if (props.disableMiniAnimation) return
if (props.noMiniAnimation) return
if (props.modelValue === true) {
animateMini()
$layout.animate()
Expand Down
22 changes: 11 additions & 11 deletions ui/src/components/drawer/QDrawer.json
Expand Up @@ -42,16 +42,23 @@
"category": "style"
},

"dark": {
"extends": "dark"
},

"mini-to-overlay": {
"type": "Boolean",
"desc": "Mini mode will expand as an overlay",
"category": "behavior"
},

"no-mini-animation": {
"type": "Boolean",
"desc": "Disables animation of the drawer when toggling mini mode",
"category": "behavior",
"addedIn": "v2.11.11"
},

"dark": {
"extends": "dark"
},

"breakpoint": {
"type": "Number",
"desc": "Breakpoint (in pixels) of layout width up to which mobile mode is used",
Expand Down Expand Up @@ -108,13 +115,6 @@
"type": "Boolean",
"desc": "Disables the default behavior where drawer backdrop can be swiped",
"category": "behavior"
},

"disable-mini-animation": {
"type": "Boolean",
"desc": "Disables animation of the drawer when toggling mini mode",
"category": "behavior",
"addedIn": "v2.11.11"
}
},

Expand Down

0 comments on commit 557ffd8

Please sign in to comment.