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

scrollEventIntoView bug when event falls in time span not matching workingTime #4293

Closed
matsbryntse opened this issue Mar 1, 2022 · 0 comments
Labels
bug Something isn't working forum Issues from forum resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@matsbryntse
Copy link
Member

Forum post

Bug happens when trying to set selected item on Scheduler if Task ist not visible in week View.
I am using dayView with all hours visible in workingTime, and Weekview with visible hours from 6 to 20 Oclock.

  workingTimeDay = {
    fromHour: 0,
    toHour: 0
  };
  workingTimeWeek = {
    fromHour: 6,
    toHour: 20
  };
const selectedEvent = this.scheduler.scheduler.eventStore ?
            this.scheduler.scheduler.eventStore.find((i) => i.taskId === event.taskId) : undefined;
            
if (selectedEvent) {
    this.scheduler.scheduler.scrollEventIntoView(selectedEvent as any, { highlight: true, focus: true })} 
    else {
    console.log('selected event not found on Scheduler or not in visible area!');
}
Cannot read properties of null (reading 'x')
TypeError: Cannot read properties of null (reading 'x')
    at http://localhost:4201/main.js:
    at new ZoneAwarePromise 
    at Scheduler.scrollUnrenderedEventIntoView 
    at Scheduler.scrollResourceEventIntoView
    at Scheduler.scrollEventIntoView 

Is it possible to check if Event in EventStore is visible in Scheduler?
Thanks

@matsbryntse matsbryntse added bug Something isn't working forum Issues from forum labels Mar 1, 2022
@matsbryntse matsbryntse added this to the 5.0.1 milestone Mar 1, 2022
@matsbryntse matsbryntse added ready for review Issue is fixed, the pull request is being reviewed resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

1 participant