Skip to content

Commit

Permalink
Merge pull request #202 from HC200ok/feature/table-node-id
Browse files Browse the repository at this point in the history
add tableNodeId prop
  • Loading branch information
HC200ok authored Jan 15, 2023
2 parents 5ef3919 + 5cc90cb commit 0696698
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "HC200ok",
"description": "A customizable and easy-to-use data table component made with Vue.js 3.x.",
"private": false,
"version": "1.5.25",
"version": "1.5.26",
"types": "./types/main.d.ts",
"license": "MIT",
"files": [
Expand Down
3 changes: 2 additions & 1 deletion src/components/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'border-cell': borderCell,
}"
>
<table>
<table :id="tableNodeId">
<colgroup>
<col
v-for="(header, index) in headersForRender"
Expand Down Expand Up @@ -319,6 +319,7 @@ const props = defineProps({
});
const {
tableNodeId,
clickEventType,
bodyTextDirection,
checkboxColumnWidth,
Expand Down
1 change: 1 addition & 0 deletions src/modes/Client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<input type="text" v-model="searchValue">
<div>
<DataTable
table-node-id="my-table"
v-model:items-selected="itemsSelected"
click-row-to-expand
ref="dataTable"
Expand Down
4 changes: 4 additions & 0 deletions src/propsWithDefault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,8 @@ export default {
type: Boolean,
default: false,
},
tableNodeId: {
type: String,
default: '',
},
};

0 comments on commit 0696698

Please sign in to comment.