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

fix(datetime): time picker now scrolls to correct value #24879

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export class PickerColumnInternal implements ComponentInterface {
const ev = entries[0];

if (ev.isIntersecting) {
this.isColumnVisible = true;
/**
* Because this initial call to scrollActiveItemIntoView has to fire before
* the scroll listener is set up, we need to manage the active class manually.
Expand All @@ -101,13 +102,13 @@ export class PickerColumnInternal implements ComponentInterface {
this.activeItem?.classList.add(PICKER_COL_ACTIVE);

this.initializeScrollListener();
this.isColumnVisible = true;
} else {
this.isColumnVisible = false;

if (this.destroyScrollListener) {
this.destroyScrollListener();
this.destroyScrollListener = undefined;
}
this.isColumnVisible = false;
}
}
new IntersectionObserver(visibleCallback, { threshold: 0.01 }).observe(this.el);
Expand Down