Skip to content

Commit 7738eee

Browse files
committed
feat(VExpansionPanel): add open prop to content and header slots
closes #15782
1 parent 8253c7e commit 7738eee

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/api-generator/src/maps/v-expansion-panel-content.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ module.exports = {
33
slots: [
44
{
55
name: 'default',
6-
props: undefined,
6+
props: {
7+
open: 'boolean',
8+
},
79
},
810
],
911
},

packages/api-generator/src/maps/v-expansion-panel-header.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ module.exports = {
33
slots: [
44
{
55
name: 'actions',
6-
props: undefined,
6+
props: {
7+
open: 'boolean',
8+
},
79
},
810
{
911
name: 'default',

packages/vuetify/src/components/VExpansionPanel/VExpansionPanelContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default baseMixins.extend<options>().extend({
6767
value: this.isActive,
6868
}],
6969
}), [
70-
h('div', { class: 'v-expansion-panel-content__wrap' }, getSlot(this)),
70+
h('div', { class: 'v-expansion-panel-content__wrap' }, getSlot(this, 'default', { open: this.isActive })),
7171
]),
7272
]))
7373
},

packages/vuetify/src/components/VExpansionPanel/VExpansionPanelHeader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default baseMixins.extend<options>().extend({
8080
this.$emit('click', e)
8181
},
8282
genIcon () {
83-
const icon = getSlot(this, 'actions') ||
83+
const icon = getSlot(this, 'actions', { open: this.isActive }) ||
8484
[this.$createElement(VIcon, this.expandIcon)]
8585

8686
return this.$createElement(VFadeTransition, [

0 commit comments

Comments
 (0)