Closed rsbondi closed 6 years ago
The second issue has been solved by adding withProperties
to the binding.
The first issue seems to be beyond context, see here. A simple expression data-bind='text: 1+2'
does not get evaluated.
@rsbondi I don't currently work a lot on this project or knockout in general but would love an updated example in the docs to address this issue if you have the time to put together a PR.
I have a solution, make the controlsDescendantBindings an option, my example works if set to false. If I do the following, it should keep the same default behavior but give the option
var options = popoverBindingValues.options || {
title: 'popover',
controlDecendents: true
};
...
return {
controlsDescendantBindings: typeof options.controlDecendents == 'undefined' ? true : options.controlDecendents
};
I can PR this change, but I am curious why the default of true?
Not sure this was originally built with Knockout 2 so that could have had different behavior. Bindings inside of popovers is one of the more challenging cases within this plugin.
I will PR, maybe next week when I get back home.
I am having 2 issues while using the popover binding in a loop.
example
First issue is the display x of n in the example, if I remove the popover binding, the display is correct. I have tried many variations but can not find a context that will keep the display.
The second issue is when I select an item to show the popover, I get an error
Cannot read property 'mine' of undefined
, any help identifying the context here would be appreciated