brianmhunt / knockout-fast-foreach

Foreach. Faster. For Knockout.
MIT License
58 stars 18 forks source link

Backport `as` from tko.binding.foreach #47

Open brianmhunt opened 7 years ago

brianmhunt commented 7 years ago

This: https://github.com/knockout/tko.binding.foreach/commit/b3380c97c7c0ff453b700d1d39e9c03ffc3d62a4

@cervengoc – If you get a chance, please feel free to incorporate the changes from the referenced patch.

Cheers.

jensb commented 4 years ago

Yes, can we please do this? We are using the 'as' parameter heavily in knockout-v3.5 (see also issue 52) and would love to benefit from the speedup this library provides.

brianmhunt commented 4 years ago

Thanks @jensb — do you think you'd be able to put together a PR?

jensb commented 4 years ago

I tried. Let's see if it works, shall we? :-)

jensb commented 4 years ago

Can you please tes this PR? I am getting errors about $parent being undefined when testing it on my app. Is this variable now obsolete (and what do I replace it with)?

brianmhunt commented 4 years ago

Hi @jensb I'm not set up to test this right now, but if $parent is missing, I'd think the problem is with one of the return values of createContextGenerator — in particular look to see if what they return contains $parent.