Closed danieldickison closed 2 years ago
Good find, thanks. This would seem to be a problem with the bindingContext
lookup
function.
A PR with a failing test would be a good starting point.
Glad you've a workaround with the formatUser
, in the interim.
Tests in #151 and it looks like lambda parameter lists aren't being evaluated at all at the moment, and multiple parameters fail to parse. I've been looking at parser.ts but haven't quite wrapped my head around how all the parts fit together.
@brianmhunt do you think you would be able to look into this soon? If not, I'll continue developing a fix in the parser over the next couple of days.
edit: the pull request now has a fix for this in it.
I tried a lambda (arrow-function) value for
optionsText
, following the knockout docs’ example, which uses afunction
value:This fails with:
Specifying the
optionsText
as a function reference does work:optionsText: formatUser
Demo: https://jsfiddle.net/danieldickison/az2on6h0/4/