Skip to content

Commit 3a9f793

Browse files
author
Pablo Henrique
authored
Merge pull request vuematerial#854 from lucasfernog/develop
Small fixes on mdChips, mdTablePagination (issue vuematerial#830) and mdInputContainer buttons
2 parents 909c879 + 567440a commit 3a9f793

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/components/mdChips/mdChips.vue

Lines changed: 1 addition & 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

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="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/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)