Skip to content

Commit acc97d6

Browse files
committed
Merge remote-tracking branch 'origin/improvement/mdList' into develop
* origin/improvement/mdList: enable multiple expansions in mdList vuematerial#442
2 parents f3ad8bc + b8c774d commit acc97d6

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

docs/src/pages/components/List.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@
7070
<md-table-cell><code>Boolean</code></md-table-cell>
7171
<md-table-cell>Disable the item and prevent his actions. Default <code>false</code></md-table-cell>
7272
</md-table-row>
73+
</md-table-row>
74+
75+
<md-table-row>
76+
<md-table-cell>md-expand-multiple</md-table-cell>
77+
<md-table-cell><code>Boolean</code></md-table-cell>
78+
<md-table-cell>Allow multiple items be expanded in same time in md-list. Default <code>false</code></md-table-cell>
79+
</md-table-row>
7380
</md-table-body>
7481
</md-table>
7582

@@ -845,7 +852,7 @@
845852
<div slot="demo">
846853
<div class="phone-viewport">
847854
<md-list>
848-
<md-list-item>
855+
<md-list-item md-expand-multiple>
849856
<md-icon>whatshot</md-icon>
850857
<span>News</span>
851858

@@ -858,7 +865,7 @@
858865
</md-list-expand>
859866
</md-list-item>
860867

861-
<md-list-item>
868+
<md-list-item md-expand-multiple>
862869
<md-icon>videogame_asset</md-icon>
863870
<span>Games</span>
864871

@@ -871,7 +878,7 @@
871878
</md-list-expand>
872879
</md-list-item>
873880

874-
<md-list-item>
881+
<md-list-item md-expand-multiple>
875882
<md-icon>video_library</md-icon>
876883
<span>Video</span>
877884

src/components/mdList/mdList.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@
288288
}
289289
}
290290

291+
&.md-active + .md-active:before {
292+
background: none;
293+
}
294+
291295
> .md-list-item-container .md-list-expand-indicator {
292296
transform: rotateZ(180deg) translate3D(0, 0, 0);
293297
}

src/components/mdList/mdListItemExpand.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
export default {
2121
name: 'md-list-item',
2222
props: {
23-
disabled: Boolean
23+
disabled: Boolean,
24+
mdExpandMultiple: Boolean
2425
},
2526
data() {
2627
return {
@@ -67,7 +68,10 @@
6768
});
6869
},
6970
toggleExpandList() {
70-
this.resetSiblings();
71+
if (!this.mdExpandMultiple) {
72+
this.resetSiblings();
73+
}
74+
7175
this.calculatePadding();
7276
this.active = !this.active;
7377
},

0 commit comments

Comments
 (0)