I defined a custom binding that alters some way an observable's property, let's say customProperty. (for example):
ko.bindingHandlers.customBinding = {
update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
//computes some value depending on observable value
//...
valueAccessor().customProperty = someValue;
}
};
I also have a computed observable that triggers on my customBinded observable, in which I need the value of customProperty updated. It turns out logging inside custom binding and in computed code that computed is calculated before customBinding, so it reads old customProperty value.
Can I specify that binding has priority over computeds, or is there some workaround to achieve computed to "wait" for custom binding?