Skip to content

Commit

Permalink
feat(MdTableCell): add md-id prop (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 authored and marcosmoura committed Mar 7, 2018
1 parent f2347f1 commit 7e7249a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/MdTable/MdTableCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
export default {
name: 'MdTableCell',
props: {
mdId: [String, Number],
mdLabel: String,
mdNumeric: Boolean,
mdTooltip: String,
Expand Down Expand Up @@ -44,6 +45,7 @@
methods: {
setCellData ($vm = this) {
this.$set(this.MdTable.items, $vm.index, {
id: $vm.mdId,
label: $vm.mdLabel,
numeric: $vm.mdNumeric,
tooltip: $vm.mdTooltip,
Expand Down
3 changes: 2 additions & 1 deletion src/components/MdTable/MdTableHead.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<th class="md-table-head" :class="headClasses" :style="headStyles" @click="changeSort">
<th class="md-table-head" :id="id" :class="headClasses" :style="headStyles" @click="changeSort">
<div class="md-table-head-container" v-if="$slots.default">
<div class="md-table-head-label">
<slot />
Expand Down Expand Up @@ -30,6 +30,7 @@
props: {
mdNumeric: Boolean,
numeric: Boolean,
id: [String, Number],
label: String,
tooltip: String,
sortBy: String
Expand Down

0 comments on commit 7e7249a

Please sign in to comment.