Skip to content

Commit 8a03103

Browse files
committed
Small enhancements
- Fix lingering white border on `md-input-container` buttons (`md-has-password`/`md-clearable`) - Fix `md-table` sort type not defaulting to 'asc' when `md-sort` prop is set - Add `md-iconset` support to md-tab (fixes vuematerial#704)
1 parent 5968ae4 commit 8a03103

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

src/components/mdInputContainer/mdInputContainer.theme

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,5 @@
5757
color: #{'BACKGROUND-CONTRAST-0.38'};
5858
}
5959
}
60-
61-
.md-icon:not(.md-icon-delete):after {
62-
background: #{'BACKGROUND-COLOR'};
63-
}
6460
}
6561
}

src/components/mdTable/mdTableHead.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
initSort() {
6969
if (this.hasMatchSort()) {
7070
this.sorted = true;
71-
this.sortType = this.parentTable.sortType;
71+
this.sortType = this.parentTable.sortType || 'asc';
7272
}
7373
}
7474
},

src/components/mdTabs/mdTab.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
id: [String, Number],
1515
mdLabel: [String, Number],
1616
mdIcon: String,
17+
mdIconset: String,
1718
mdActive: Boolean,
1819
mdDisabled: Boolean,
1920
mdOptions: {
@@ -47,6 +48,9 @@
4748
mdIcon() {
4849
this.updateTabData();
4950
},
51+
mdIconset() {
52+
this.updateTabData();
53+
},
5054
mdOptions: {
5155
deep: true,
5256
handler() {
@@ -80,6 +84,7 @@
8084
id: this.tabId,
8185
label: this.mdLabel,
8286
icon: this.mdIcon,
87+
iconset: this.mdIconset,
8388
options: this.mdOptions,
8489
active: this.mdActive,
8590
disabled: this.mdDisabled,

src/components/mdTabs/mdTabs.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,25 @@
1313
@click="setActiveTab(header)"
1414
ref="tabHeader">
1515
<md-ink-ripple :md-disabled="header.disabled"></md-ink-ripple>
16+
1617
<div class="md-tab-header-container">
1718
<md-icon v-if="header.icon">{{ header.icon }}</md-icon>
19+
<md-icon v-else-if="header.iconset" :md-iconset="header.iconset">{{ header.icon }}</md-icon>
20+
1821
<span v-if="header.label">{{ header.label }}</span>
22+
1923
<md-tooltip v-if="header.tooltip" :md-direction="header.tooltipDirection" :md-delay="header.tooltipDelay">{{ header.tooltip }}</md-tooltip>
2024
</div>
2125
</button>
2226

2327
<span class="md-tab-indicator" :class="indicatorClasses" ref="indicator"></span>
2428
</div>
2529
</div>
30+
2631
<button v-if="mdNavigation && hasNavigationScroll" @click="navigationScrollLeft" class="md-tab-header-navigation-button md-left" :class="navigationLeftButtonClasses">
2732
<md-icon>keyboard_arrow_left</md-icon>
2833
</button>
34+
2935
<button v-if="mdNavigation && hasNavigationScroll" @click="navigationScrollRight" class="md-tab-header-navigation-button md-right" :class="navigationRightButtonClasses">
3036
<md-icon>keyboard_arrow_right</md-icon>
3137
</button>
@@ -251,7 +257,7 @@
251257
this.hasNavigationScroll = scrollWidth > clientWidth;
252258
},
253259
setActiveTab(tabData) {
254-
this.hasIcons = !!tabData.icon;
260+
this.hasIcons = !!tabData.icon || !!tabData.iconset;
255261
this.hasLabel = !!tabData.label;
256262
this.activeTab = tabData.id;
257263
this.activeTabNumber = this.getTabIndex(this.activeTab);

0 commit comments

Comments
 (0)