Hi Guys,
So after the update on newer version of Scheduler 4.3 I noticed that after Task is removed from the Scheduler it still remains visible.
Task disapears when scrolling...
Is this rendering issue?
Hi Mats, so all tasks and variable things come from store as Observables and are binded to Scheduler with async operator.
<bry-scheduler #bycalendarschedule
[events]="schedulerEvents$ | async"
[resources]="resources$ | async"
[resourceTimeRanges]="resourceVacations$ | async"
[startDate]="startDate$ | async"
[endDate]="endDate$ | async"
Meaning when change in store happens scheduler should just re-render it.
If change is Add or Update to events in events Array - Scheduler renders it just fine.
If item is deleted from events Array - than event just hangs on Scheduler visible until Scheduler is scrolled / resized etc...
I give my best in creating simple reproduction demo project... Thanks
Hi Mats,
I managed to strip all unnecesarry features from my project and show this behaviour - demo project in attachment.
Important files:
scheduler.state.ts - Here I have test task event for today
scheduler-resources.state.ts - Here is my user - Resource
section-header.component.ts - triggers clear all events or add a new one...
section-main.component - where bryntum scheduler is added
Steps to reproduce:
How to run project:
npm i
npm run start
I looked at your code and I see you used old wrapper. You have to update your SchedulerComponent too and use our version that you should import from the package instead of using old implementation:
import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { BryntumSchedulerComponent } from '@bryntum/scheduler-angular';
import { Scheduler, SchedulerConfig } from '@bryntum/scheduler/scheduler.lite.umd.js';
import { schedulerConfig } from './scheduler.config';
@Component({
selector : 'app-scheduler',
templateUrl : './scheduler.component.html',
styleUrls : ['./scheduler.component.scss']
})
export class SchedulerComponent implements AfterViewInit {
@ViewChild(BryntumSchedulerComponent, { static : true }) schedulerComponent: BryntumSchedulerComponent | undefined;
scheduler: Scheduler | undefined;
public schedulerConfig: Partial<SchedulerConfig> = schedulerConfig
ngAfterViewInit(): void {
this.scheduler = this.schedulerComponent.instance;
}
}
It has a new version of ng events handling, it should help you here.
Check our Angular examples, it already uses it.
All the best,
Alex
Take a look at our guide pls https://bryntum.com/docs/scheduler/guide/Scheduler/integration/angular#wrappers
Let me know if it helped.
All the best,
Alex
If you need to get an instance, it has instance
variable. Check the code example I posted above:
ngAfterViewInit(): void {
this.scheduler = this.schedulerComponent.instance;
}
All the rest are described here: https://bryntum.com/docs/scheduler/guide/Scheduler/integration/angular#configs-properties-and-events
All the best,
Alex
Hi Alex,
with massive rafactoring effort I managed to migrate all configs to the wrapper and personaly think this is a step back in configurability...
However resourceTimeRanges is not working anymore.
Resource
{
areaIndex: 2
id: "T:2:1070"
index: 29
name: "Jahic Sanid"
technicianId: 1070
technicianName: "Jahic Sanid"
technicianShortcut: "SJA"
}
{
endDate: "2021-12-08"
id: 10
lendingid: -1
name: "Nicht verfügbar"
resourceId: "T:2:1070"
startDate: "2021-12-07"
timeRangeColor: "gray"
}
Is string format of Start and Enddate still correct?