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
opening a new file scrolls file bar to the newly opened file #69
opening a new file scrolls file bar to the newly opened file #69
Conversation
Signed-off-by: aarora4 <lazyc78@gmail.com>
ngAfterViewChecked() { | ||
const changes = this.iterableDiffer.diff(this.data); | ||
if (changes) { | ||
this.componentRef.directiveRef.scrollToRight(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is half right: you scroll to right when opening.
But if I close, although it selects the one all the way to the left (which is fine), it doesn't scroll to the left.
I suggest listening on editorControl for a close event and doing scrollToLeft() if possible.
Signed-off-by: aarora4 <lazyc78@gmail.com>
Signed-off-by: aarora4 <lazyc78@gmail.com>
return; | ||
} | ||
|
||
this.componentRef.directiveRef.scrollToElement(`.tabs-file-list > li:nth-child(${i + 1})`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a new problem with this branch: I can't scroll my list (though my list can be auto-scrolled by closing & opening), and am having trouble clicking to change tabs for some tabs near the left or right sides.
I think it's this line of code, but not certain. Basically, you only would want to auto-scroll if there has been a change in the quantity, but here it's just after view check, which I believe could be for a different reason.
Signed-off-by: aarora4 <lazyc78@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, with latest fixes this seems good!
Signed-off-by: aarora4 lazyc78@gmail.com
Checked by Michael Roffo