eManPrague / frui.ts

Pragmatic MVVM frontend framework
MIT License
14 stars 5 forks source link

ConductorOneChildActive - easily prevent automatic activation of next children #37

Closed kopecmi8 closed 1 year ago

kopecmi8 commented 3 years ago

There are two patterns ConductorOneChildActive and ConductorSingleChild. But no one of them solves situation if you have "finite list of potentional children" but you dont want to activate next child in order after closing one.

I thing if you have finitite list of child its better to use ConductorOneChildActive than ConductorSingleChild because of children array existency. But the mechanism determination of nextChildToActivate is little bit weird. The situation is not improved by the fact that the determineNextChildToActivate method is private and cannot be easilly overloaded.

I thing this mechanism should be easilly turn off by specifiing some flag or at least should be possible to overload by declaring determineNextChildToActivate as protected.

gius commented 1 year ago

Irrelevant in v1 - the behavior depends on the actually used router.