-
Notifications
You must be signed in to change notification settings - Fork 34
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
Scrolls don't appear when content is inserted #85
Comments
I've also noticed this, but in the other direction as well, namely, the scroll bar is not removed, or its height is not changed, when content is removed such that the ember-scrollable container should no longer scroll, or doesnt need to scroll as much. Basically, any interactions/modifications that cause a change in the scroll content dimensions other than a window resize doesn't trigger a scroll size recalculation. While not ideal, this issue could probably be mitigated by having some sort of imperative action/event that is sent to the component to force a scroll recalculation, is there any way to do this currently? |
Right now we have no real notion of dynamic height of the scroll content, and we pass in the size as so: you may be able to use the actions yielded here to trigger a resize. |
@alexander-alvarez thanks for the response on this. I was able to actually solve my immediate use case roughly how you suggested, I used the {{#ember-scrollable actionReceiver=myScrollable}}...{{/ember-scrollable}} myContentDidChange: observer('myContent', function() {
this.get('myScrollable').send('recalculate');
}) |
^ This might be something worth mentioning in the docs too |
i'm finding that set height="auto" and using flexbox to size the table to full available height results in a blank content. It looks like the twiddle posted above has the same problem, there is no content visible? https://ember-twiddle.com/071a58e410a17c64b8a0eee205d6be44?openFiles=templates.application.hbs%2C |
For example when using ajax to get some text.
component.js:
component.hbs:
It is necessary to wrap ember-scrollable into {{#if text}}{{/if}}.
The text was updated successfully, but these errors were encountered: