Skip to content

Commit d910c4b

Browse files
committed
fix: tests and building not passing due to TS types
1 parent 4826525 commit d910c4b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@uwlajs/vue-data-table",
33
"description": "Vue plugin to easily create fully-featured data tables",
4-
"version": "2.1.1",
4+
"version": "2.1.2",
55
"author": "uwla",
66
"private": false,
77
"license": "MIT",

src/components/Table/Table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export default defineComponent({
1212
tableClass: String,
1313
columns: Array as () => any,
1414
data: Array,
15-
dataDisplayed: Array,
16-
dataFiltered: Array,
15+
dataDisplayed: Array as () => any,
16+
dataFiltered: Array as () => any,
1717
emptyTableText: String,
1818
footerComponent: [Object, String],
1919
isEmpty: Boolean,

tests/customComponent.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ test('it emits user events from custom components', async () => {
7171
// determine the payload
7272
let row = clicked[0] as any
7373
let action = clicked[1] as any
74-
let payload = [{ action: action, data: data[row-1] }]
74+
let payload = [{
75+
action: action,
76+
data: {
77+
... data[row-1],
78+
_key: row-1
79+
},
80+
}]
7581

7682
// assert payload
7783
expect(event[currentEvent]).toEqual(payload)

0 commit comments

Comments
 (0)