Skip to content

Commit f7a58ab

Browse files
author
Pablo Henrique
authored
Merge pull request vuematerial#858 from vuematerial/develop
Develop
2 parents 5cadb29 + e845b16 commit f7a58ab

File tree

9 files changed

+34
-22
lines changed

9 files changed

+34
-22
lines changed

docs/src/pages/components/Menu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@
529529
</md-menu-content>
530530
</md-menu>
531531

532-
<md-button class="md-raised md-primary" @click="$refs.menu.open">Open contact card</md-button>
532+
<md-button class="md-raised md-primary" @click="$refs.menu.open()">Open contact card</md-button>
533533
</div>
534534

535535
<div slot="code">

docs/src/pages/components/Tabs.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@
440440
</docs-component>
441441
</page-content>
442442
</template>
443+
443444
<style>
444445
.label-with-new-badge {
445446
font-weight: bolder;

docs/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["0.5.1", "0.5.2", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.7.0", "0.7.1", "0.7.2", "0.7.2", "0.7.2", "0.7.2", "0.7.2.1", "0.7.3"]
1+
["0.5.1", "0.5.2", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.7.0", "0.7.1", "0.7.2", "0.7.3"]

src/components/mdCheckbox/mdCheckbox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<md-ink-ripple :md-disabled="disabled" />
66
</div>
77

8-
<label :for="id || name" class="md-checkbox-label" v-if="$slots.default" @click="toggleCheck">
8+
<label :for="id || name" class="md-checkbox-label" v-if="$slots.default" @click.prevent="toggleCheck">
99
<slot></slot>
1010
</label>
1111
</div>
@@ -27,7 +27,7 @@
2727
mixins: [theme],
2828
data() {
2929
return {
30-
checked: this.value
30+
checked: this.value || false
3131
};
3232
},
3333
computed: {

src/components/mdChips/mdChips.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
@keydown.native.prevent.enter="addChip"
2424
@keydown.native.prevent.186="addChip"
2525
tabindex="0"
26+
:debounce="0"
2627
ref="input">
2728
</md-input>
2829

@@ -41,6 +42,10 @@
4142
props: {
4243
value: Array,
4344
disabled: Boolean,
45+
debounce: {
46+
type: Number,
47+
default: 1E2
48+
},
4449
mdInputId: String,
4550
mdInputName: String,
4651
mdInputPlaceholder: String,

src/components/mdInputContainer/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
value: [String, Number],
44
debounce: {
55
type: Number,
6-
default: 3E2
6+
default: 1E2
77
},
88
disabled: Boolean,
99
required: Boolean,

src/components/mdInputContainer/mdInputContainer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
<span class="md-count" v-if="enableCounter">{{ inputLength }} / {{ counterLength }}</span>
66

7-
<md-button class="md-icon-button md-toggle-password" @click="togglePasswordType" v-if="mdHasPassword">
7+
<md-button tabindex="-1" class="md-icon-button md-toggle-password" @click.prevent="togglePasswordType" v-if="mdHasPassword">
88
<md-icon>{{ showPassword ? 'visibility_off' : 'visibility' }}</md-icon>
99
</md-button>
1010

11-
<md-button class="md-icon-button md-clear-input" @click="clearInput" v-if="mdClearable && hasValue">
11+
<md-button tabindex="-1" class="md-icon-button md-clear-input" @click="clearInput" v-if="mdClearable && hasValue">
1212
<md-icon>clear</md-icon>
1313
</md-button>
1414
</div>

src/components/mdList/mdListItem.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
},
1313
render(createElement, { children, data, props }) {
1414
const getItemComponent = () => {
15-
const nativeOn = data.nativeOn;
15+
const on = data.on;
1616
const interactionEvents = [
1717
'contextmenu',
1818
'dblclick',
@@ -27,16 +27,6 @@ export default {
2727
return MdListItemLink;
2828
}
2929

30-
if (nativeOn) {
31-
let counter = interactionEvents.length;
32-
33-
while (counter--) {
34-
if (nativeOn[interactionEvents[counter]]) {
35-
return MdListItemButton;
36-
}
37-
}
38-
}
39-
4030
while (childrenCount--) {
4131
const options = children[childrenCount].componentOptions;
4232

@@ -59,6 +49,16 @@ export default {
5949
}
6050
}
6151

52+
if (on) {
53+
let counter = interactionEvents.length;
54+
55+
while (counter--) {
56+
if (on[interactionEvents[counter]]) {
57+
return MdListItemButton;
58+
}
59+
}
60+
}
61+
6262
return MdListItemDefault;
6363
};
6464

src/components/mdTable/mdTablePagination.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="md-table-pagination">
33
<span class="md-table-pagination-label">{{ mdLabel }}:</span>
44

5-
<md-select v-model="currentSize" md-menu-class="md-pagination-select" @change="changeSize" v-if="mdPageOptions">
5+
<md-select v-model="currentSize" md-menu-class="md-pagination-select" @change="changeSize" v-if="mdPageOptions !== false">
66
<md-option v-for="amount in mdPageOptions" :key="amount" :value="amount">{{ amount }}</md-option>
77
</md-select>
88

@@ -26,7 +26,10 @@
2626
type: [Number, String],
2727
default: 10
2828
},
29-
mdPageOptions: [Array, Boolean],
29+
mdPageOptions: {
30+
type: [Array, Boolean],
31+
default: () => [10, 25, 50, 100]
32+
},
3033
mdPage: {
3134
type: [Number, String],
3235
default: 1
@@ -110,8 +113,11 @@
110113
},
111114
mounted() {
112115
this.$nextTick(() => {
113-
this.mdPageOptions = this.mdPageOptions || [10, 25, 50, 100];
114-
this.currentSize = this.mdPageOptions.includes(this.currentSize) ? this.currentSize : this.mdPageOptions[0];
116+
if (this.mdPageOptions) {
117+
this.currentSize = this.mdPageOptions.includes(this.currentSize) ? this.currentSize : this.mdPageOptions[0];
118+
} else {
119+
this.currentSize = 0;
120+
}
115121
this.canFireEvents = true;
116122
});
117123
}

0 commit comments

Comments
 (0)