Skip to content

Commit cc66554

Browse files
committed
fix: CDataTable: fix 'columnFilterValue' prop updating
1 parent a3c99a7 commit cc66554

8 files changed

+105
-105
lines changed

dist/coreui-vue.common.js

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

dist/coreui-vue.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/coreui-vue.umd.js

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

dist/coreui-vue.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/coreui-vue.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/coreui-vue.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/table/CDataTable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export default {
263263
tableFilterState: this.tableFilterValue,
264264
columnFilterState: {},
265265
sorterState: {
266-
column: undefined,
266+
column: null,
267267
asc: true
268268
},
269269
page: this.activePage || 1,
@@ -424,7 +424,7 @@ export default {
424424
if (!this.sorter || !this.sorter.resetable) {
425425
state.column = column
426426
} else {
427-
state.column = columnRepeated && state.asc === false ? undefined : column
427+
state.column = columnRepeated && state.asc === false ? null : column
428428
}
429429
state.asc = !(columnRepeated && state.asc)
430430
this.$emit('update:sorter-value', this.sorterState)
@@ -435,7 +435,7 @@ export default {
435435
return
436436
}
437437
this.$set(this.columnFilterState, colName, value)
438-
this.$emit('update:column-filter-value', this.tableFilterState)
438+
this.$emit('update:column-filter-value', this.columnFilterState)
439439
},
440440
tableFilterChange (value, type) {
441441
const isLazy = this.tableFilter && this.tableFilter.lazy === true

src/components/table/tests/CDataTable.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe(ComponentName, () => {
169169
sorter: { resetable : true }
170170
})
171171
click(3)
172-
expect(localWrapper.vm.sorterState.column).toBe(undefined)
172+
expect(localWrapper.vm.sorterState.column).toBe(null)
173173
click(2)
174174
expect(localWrapper.vm.sorterState.asc).toBe(false)
175175
})

0 commit comments

Comments
 (0)