Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request new Callback for Components in a Substitution/Slot #30

Closed
francoisfrisch opened this issue Jan 11, 2012 · 1 comment
Closed
Labels

Comments

@francoisfrisch
Copy link
Contributor

Problem:

Lets say I have Components - A, B, C - in a Substitution. Component A must refresh while it is in view such as a Twitter feed view. When the Component is hidden from View, the refresh must stop.

I was looking for callbacks in the Component that are similar to:

    Component A {
        didBecomeActiveInSlot: function(slot, componentThatWasHidden) { }
        didBecomeInactiveInSlot: function(slot, componentThatWillBeShownNext) { .. }
    }

In this case, I can start a timer in didBecomeActiveInSlot callback and stop the timer in the didBecomeInactiveInSlot callback.

Other examples:

  • The Component must refresh the contents whenever it comes into view
  • The Component can release memory when it is not in view
@francoisfrisch
Copy link
Contributor Author

Solved by enterDocument and exitDocument

Stuk added a commit to Stuk/montage that referenced this issue Jun 19, 2013
91e8c20 0.13.0
30f33b7 Don't include docs in published package
d16ec74 Update changelog for v0.13.0
8d392fb Merge pull request montagejs#32 from Stuk/q0.9.6
8faafae Merge pull request montagejs#30 from Stuk/meta
f4e19e9 Add keywords for npm
8317ade Update Q to v0.9.6 in package.json
5f3ce24 Update Q to v0.9.6
361bdb8 Squashed 'packages/q/' changes from 67a5fc4..552cba2
ea27279 Correct dataset shim
d9cc725 Merge pull request montagejs#31 from Stuk/split-docs
1fce326 Correct markdown links for github
a2e8015 Correct sentence about tests
f178305 Split code example into two blocks
7984d95 Decrease title level
db5fdd0 Montage Require -> Mr in documentation
331d134 Split the readme into multiple documentation files
8221970 Add a bit more complete demo
6764246 Fix bootstrap stopping if document has finished loading

git-subtree-dir: packages/mr
git-subtree-split: 09ec986c0bd9065540b495827374612268e9bd74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant