You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
if binding evaluating to false delays invocation of koDescendantsComplete #414
Migrating from knockout, I have component templates that have simple if binding checks like
<!-- ko if: showTabsList -->
if showTabsList is set to false, and we have a koDescendantsComplete() function, that function is never called. Only when showTabsList is set to true will koDescendantsComplete be called.
This appears to be similar behavior to knockout's completeOn: "render" option, but that's not what we want/need.
Is there any way to have koDescendantsComplete even when an if binding is bound to false?
Of note - we've found that the descendantsComplete binding handler applies TOO EARLY (before a child foreach has updated the DOM) - I'm not sure if the comment on the fix "Fix mirrors DescendantBindingHandler" if that will also be too early.
@phillipc any ideas when the next release will happen for me to test the updates? thanks
Interesting @phillipc ... switching from descendantsComplete to childrenComplete could work for a single sub-component, but we have multiple and we need to wait for all of them to have childrenComplete before invoking our logic.
And yes we do have ko.options.createChildContextWithAs = true; set.
Any update on when the next release with koDescendantsComplete behavior fixes might be released?
Activity
brimimc commentedon Jul 8, 2026
This may be fixed in latest - will need to get a release to test with
brimimc commentedon Jul 16, 2026
Of note - we've found that the descendantsComplete binding handler applies TOO EARLY (before a child foreach has updated the DOM) - I'm not sure if the comment on the fix "Fix mirrors DescendantBindingHandler" if that will also be too early.
@phillipc any ideas when the next release will happen for me to test the updates? thanks
phillipc commentedon Jul 16, 2026
Hey @brimimc, i think the
DescendantsComplete-behavior is different in TKO.Properly you can switch to
childrenComplete: render, see here:tko/packages/binding.core/spec/descendantsCompleteBehaviors.ts
Line 118 in f396518
BTW: Have you already set the option
createChildContextWithAstofalsefor your migration project (see #191)?brimimc commentedon Jul 17, 2026
Interesting @phillipc ... switching from
descendantsCompletetochildrenCompletecould work for a single sub-component, but we have multiple and we need to wait for all of them to havechildrenCompletebefore invoking our logic.And yes we do have
ko.options.createChildContextWithAs = true;set.Any update on when the next release with koDescendantsComplete behavior fixes might be released?
phillipc commentedon Jul 18, 2026
I couldn't stop thinking about this either. I've implemented a solution that restores the KO behavior.
@brianmhunt , please take a look at this. -> #416