Skip to content

Commit ce21453

Browse files
committed
feat: add new events and fix formatNotMatches returning a object bug
1 parent 1b334df commit ce21453

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/vue-treegrid.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ export default {
2828
type: String,
2929
default: "table table-bordered text-nowrap",
3030
},
31+
formatNoMatches: {
32+
type: Function,
33+
default: function () {
34+
return "";
35+
},
36+
},
3137
stickyHeader: {
3238
type: Boolean,
3339
default: true,
@@ -76,12 +82,22 @@ export default {
7682
stickyHeader: this.stickyHeader,
7783
treeShowField: this.treeShowField,
7884
parentIdField: this.parentIdField,
85+
rowStyle: this.rowStyle,
7986
onPostBody: () => this.$emit("onPostBody", treeGrid),
8087
onClickRow: (row, element, field) =>
8188
this.$emit("onClickRow", { row, element, field }),
89+
onClickCell: (field, value, row, element) =>
90+
this.$emit("onClickCell", { field, value, row, element }),
91+
onDblClickRow: (row, element, field) =>
92+
this.$emit("onDblClickRow", { row, element, field }),
93+
onDblClickCell: (field, value, row, element) =>
94+
this.$emit("onDblClickCell", { field, value, row, element }),
95+
onExpandRow: (index, row, detail) =>
96+
this.$emit("onExpandRow", { index, row, detail }),
97+
onCollapseRow: (index, row, detailView) =>
98+
this.$emit("onCollapseRow", { index, row, detailView }),
8299
headerStyle: (column) => this.$emit("headerStyle", column),
83-
rowStyle: this.rowStyle,
84-
formatNoMatches: () => this.$emit("formatNoMatches"),
100+
formatNoMatches: () => this.formatNoMatches(),
85101
});
86102
},
87103
},

0 commit comments

Comments
 (0)