Skip to content

Commit 8ac0cfc

Browse files
committed
Allow the id-as-number issue for tree view nodes.
1 parent 64fdf31 commit 8ac0cfc

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Yet another Vue treeview component.",
44
"author": "Gregg Rapoza <grapoza@gmail.com>",
55
"license": "MIT",
6-
"version": "0.3.1",
6+
"version": "0.3.2",
77
"browser": "vue-tree.umd.min.js",
88
"repository": {
99
"url": "https://github.com/grapoza/vue-tree",

src/components/TreeView.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
};
4141
},
4242
mounted() {
43-
// Force the uniqueId to be a string if present
44-
this.$set(this, 'uniqueId', this.$el.id ? this.$el.id + '' : null);
43+
this.$set(this, 'uniqueId', this.$el.id ? this.$el.id : null);
4544
},
4645
methods: {
4746
getCheckedCheckboxes() {

src/components/TreeViewNode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
required: true
100100
},
101101
parentId: {
102-
type: String,
102+
type: [String, Number],
103103
required: false
104104
},
105105
treeId: {

0 commit comments

Comments
 (0)