Closed marianfoo closed 2 years ago
Works. However I'm not a fan of these inside-out searches via
getParent()
. Sometimes they just seem unavoidable though and might even need to be made recursively.
Yeah, your right. We´ll find a solution here, it was just a hack to make it work. I think i need just the first two statements anyway:
I think i can delete the other statements.
What do you think about the generel solution? Is there any edge case i might have missed?
What do you think about the generel solution?
I like it. The only "proper" alternative that comes to mind, would be adjusting way too much ~ i.e. the entire view and routing setup I think and even then I am still not 100% sure if that'd fix the issue scrolling behavior. So yeah, I really like it.
Is there any edge case i might have missed?
I did not find any (for now 😁).
Regarding the use of getParent()
, as we know how the app is built and there is not too much crazy dynamics going on I think it is fine for now, even still it does make it all somewhat brittle but you know all that already.
I think i need just the first two statements anyway:
That was my observation as well. :)
So all in all I'd say LGTM for now, and I'll approve it. :)
Changes
navTo
in basecontroller, scroll state is saved for each viewonPatternMatched
the state from JsonModel will be read and setThanks @wridgeu for your suggestion, i hacked a little around. WDYT?