mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 18:30:35 +01:00
fix(Table): enable sorting for nested column keys (#835)
This commit is contained in:
@@ -170,8 +170,8 @@ export default defineComponent({
|
|||||||
const { column, direction } = sort.value
|
const { column, direction } = sort.value
|
||||||
|
|
||||||
return props.rows.slice().sort((a, b) => {
|
return props.rows.slice().sort((a, b) => {
|
||||||
const aValue = a[column]
|
const aValue = get(a, column)
|
||||||
const bValue = b[column]
|
const bValue = get(b, column)
|
||||||
|
|
||||||
if (aValue === bValue) {
|
if (aValue === bValue) {
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user