Skip to content

Commit

Permalink
fix: set spread es2015 with array from (#5082)
Browse files Browse the repository at this point in the history
* fix set spread es2015

* prettier
  • Loading branch information
KevinVandy authored Sep 20, 2023
1 parent 5086e8a commit 908cfce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/table-core/src/features/Pinning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,17 @@ export const Pinning: TableFeature = {
top: (old?.top ?? []).filter(d => !rowIds?.has(d)),
bottom: [
...(old?.bottom ?? []).filter(d => !rowIds?.has(d)),
...rowIds,
...Array.from(rowIds),
],
}
}

if (position === 'top') {
return {
top: [...(old?.top ?? []).filter(d => !rowIds?.has(d)), ...rowIds],
top: [
...(old?.top ?? []).filter(d => !rowIds?.has(d)),
...Array.from(rowIds),
],
bottom: (old?.bottom ?? []).filter(d => !rowIds?.has(d)),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-table/src/merge-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function mergeProxy(...sources: any): any {
const keys = []
for (let i = 0; i < sources.length; i++)
keys.push(...Object.keys(resolveSource(sources[i])))
return [...new Set(keys)]
return [...Array.from(new Set(keys))]
},
},
propTraps
Expand Down

0 comments on commit 908cfce

Please sign in to comment.