Skip to content

Commit

Permalink
#837 - Do scroll if things are collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Nov 10, 2024
1 parent b9a1174 commit 907efaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/app/beans/beans.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ export class BeansPage implements OnDestroy {
scrollComponent.el.style.height =
el.offsetHeight - scrollComponent.el.offsetTop + 'px';
this.segmentScrollHeight = scrollComponent.el.style.height;
setTimeout(() => {
/** If we wouldn't do it, and the tiles are collapsed, the next once just exist when the user starts scrolling**/
const elScroll = scrollComponent.el;
elScroll.dispatchEvent(new Event('scroll'));
}, 15);
}, 250);
}

Expand Down
7 changes: 5 additions & 2 deletions src/app/brew/brew.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ export class BrewPage implements OnInit {

this.loadBrews();

this.retriggerScroll();

this.brewStorageChangeSubscription = this.uiBrewStorage
.attachOnEvent()
.subscribe((_val) => {
Expand All @@ -118,6 +116,11 @@ export class BrewPage implements OnInit {
el.offsetHeight - scrollComponent.el.offsetTop + 'px';

this.segmentScrollHeight = scrollComponent.el.style.height;
setTimeout(() => {
/** If we wouldn't do it, and the tiles are collapsed, the next once just exist when the user starts scrolling**/
const elScroll = scrollComponent.el;
elScroll.dispatchEvent(new Event('scroll'));
}, 15);
}, 150);
}

Expand Down

0 comments on commit 907efaf

Please sign in to comment.