Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 353eaf1

Browse files
committed
fix(table): fix table's undefined problem
1 parent 95b1d18 commit 353eaf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/packages/openblocks/src/comps/comps/tableComp/tableUtils.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ export function sortData(
143143
let resultData = data;
144144
if (sorter.length > 0) {
145145
const [sortColumns, sortMethods] = _(sorter)
146-
.filter((s) => !!s.column && columns[s.column].sortable)
146+
.filter((s) => {
147+
return !!s.column && columns[s.column]?.sortable;
148+
})
147149
.map((s) => [s.column, s.desc ? "desc" : "asc"] as const)
148150
.unzip()
149151
.value() as [string[], ("desc" | "asc")[]];

0 commit comments

Comments
 (0)