-
Notifications
You must be signed in to change notification settings - Fork 664
Scheduler: T1310544 — scrollTo does not take offset into account #32160
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
Conversation
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.
Pull request overview
This PR fixes a bug where the Scheduler's scrollTo method does not properly account for the viewOffset option. The fix modifies the scroll coordinate calculation logic to find the closest cell when the exact date is not found, and updates the scroll date validation to consider the view offset.
Changes:
- Added
findClosestparameter tofindGlobalCellPositionto find the closest cell when exact date match is not found - Updated
_isValidScrollDateto considerviewOffsetwhen validating scroll dates - Simplified
_getScrollCoordinatesby removing hours/minutes parameters and using the closest cell's data - Added comprehensive test coverage for different offset scenarios (positive, negative, zero)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/testcafe-models/scheduler/index.ts | Added getCellDataAtViewportCenter() helper method for tests and refactored scrollTo() method |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_provider.ts | Added findClosest parameter to find closest cell, extracted getCellPosition helper, refactored date comparison logic |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts | Simplified _getScrollCoordinates signature, added viewOffset consideration in _isValidScrollDate() |
| e2e/testcafe-devextreme/tests/scheduler/common/scrollTo.ts | Added comprehensive test cases for scrollTo with different offset values |
No description provided.