diff --git a/src/lib/picker/picker.component.ts b/src/lib/picker/picker.component.ts index 3d6572c7..d91494ef 100644 --- a/src/lib/picker/picker.component.ts +++ b/src/lib/picker/picker.component.ts @@ -275,17 +275,18 @@ export class PickerComponent implements OnInit, AfterViewInit { activeCategory = this.SEARCH_CATEGORY; } else { const target = this.scrollRef.nativeElement; - - for (const category of this.categories) { - const component = this.categoryRefs!.find(n => n.id === category.id); - - if (component) { - const active = component.handleScroll(target.scrollTop); - + // check scroll is not at bottom + if (target.scrollHeight - target.scrollTop !== this.clientHeight) { + for (const category of this.categories) { + const component = this.categoryRefs!.find(n => n.id === category.id); + const active = component!.handleScroll(target.scrollTop); if (active) { activeCategory = category; } } + } else { + // scrolled to bottom activate last category + activeCategory = this.categories[this.categories.length - 1]; } this.scrollTop = target.scrollTop;