Skip to content

Commit 7e7249a

Browse files
Samuell1marcosmoura
authored andcommitted
feat(MdTableCell): add md-id prop (vuematerial#1584)
1 parent f2347f1 commit 7e7249a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/MdTable/MdTableCell.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
export default {
1111
name: 'MdTableCell',
1212
props: {
13+
mdId: [String, Number],
1314
mdLabel: String,
1415
mdNumeric: Boolean,
1516
mdTooltip: String,
@@ -44,6 +45,7 @@
4445
methods: {
4546
setCellData ($vm = this) {
4647
this.$set(this.MdTable.items, $vm.index, {
48+
id: $vm.mdId,
4749
label: $vm.mdLabel,
4850
numeric: $vm.mdNumeric,
4951
tooltip: $vm.mdTooltip,

src/components/MdTable/MdTableHead.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<th class="md-table-head" :class="headClasses" :style="headStyles" @click="changeSort">
2+
<th class="md-table-head" :id="id" :class="headClasses" :style="headStyles" @click="changeSort">
33
<div class="md-table-head-container" v-if="$slots.default">
44
<div class="md-table-head-label">
55
<slot />
@@ -30,6 +30,7 @@
3030
props: {
3131
mdNumeric: Boolean,
3232
numeric: Boolean,
33+
id: [String, Number],
3334
label: String,
3435
tooltip: String,
3536
sortBy: String

0 commit comments

Comments
 (0)