Skip to content

Commit

Permalink
fix(angular-virtual): fix proxying of computed functions with args (#812
Browse files Browse the repository at this point in the history
)

Calls to 'getOffsetForAlignment', getOffsetForIndex', 'getVirtualItemForOffset', and 'indexFromElement' now work as expected instead of erroring with `TypeError: fn is not a function`.
  • Loading branch information
garrettld authored Aug 27, 2024
1 parent 236b312 commit 3422577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular-virtual/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function proxyVirtualizer<
'indexFromElement',
].includes(property)
) {
const fn = untypedTarget[property] as Function
const fn = virtualizer[property as keyof V] as Function
Object.defineProperty(untypedTarget, property, {
value: toComputed(virtualizerSignal, fn),
configurable: true,
Expand Down

0 comments on commit 3422577

Please sign in to comment.