You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In vertical mode of SchedulerPro, the layoutFn function within eventLayout lacks the necessary scheduler reference. As discussed in #7659 and #5133, this reference is crucial for certain functionalities. Currently, it leads to undefined behavior, hindering proper customization.
Current Behavior:
In vertical mode:
new SchedulerPro({
mode: 'vertical',
eventLayout : {
type: 'stack',
layoutFn(items) {
console.log(this.scheduler) // => undefined
// this.scheduler is not defined
return this.scheduler.rowHeight
}
}
})
Expected Behavior:
The layoutFn function within eventLayout should have access to the scheduler reference in both vertical and horizontal modes. For instance:
new SchedulerPro({
mode: 'vertical',
eventLayout : {
type: 'stack', // default fallback layout type
layoutFn(items) {
console.log(this.scheduler) // should log the scheduler reference
if(item.someCondition) {
item.width = this.scheduler.rowWidth // or this.scheduler.rowHeight. Information in the Bryntum documentation on how to recreate the expected behavior of the layout types "stack, mixed, pack, none" with a custom layoutFn would be very helpful.
}
// return this.scheduler.rowHeight
// When nothing is returned, the default behavior of the currently set eventLayout type should be used.
}
}
})
Additional Notes:
The absence of the scheduler reference in vertical mode impedes proper customization and may lead to unexpected behavior.
The suggested modification ensures consistency across different modes and allows for more flexible customization.
The layoutFn function in this example should only affect items with matching conditions, while other items should be displayed using the default behavior of the specified eventLayout type.
This issue is crucial for ensuring the robustness and flexibility of SchedulerPro, especially in scenarios where custom layouts are necessary. Any insights or updates on this matter would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
@isglass and @matsbryntse Is the functionality of the "Expected Behavior" code snipped being added to 5.6.9?
type: 'stack', // default fallback layout type
// When nothing is returned, the default behavior of the currently set eventLayout type should be used.
Information in the Bryntum documentation on how to recreate the expected behavior of the layout types "stack, mixed, pack, none" with a custom layoutFn would be very helpful.
However, even in the latest version, 5.6.10, there is still no scheduler reference for the vertical-mode layoutFn. I conducted tests with the updated version 5.6.10 on a local project and also examined the Scheduler Pro example for custom layouts: https://bryntum.com/products/schedulerpro/examples/custom-layouts/
In vertical mode of SchedulerPro, the layoutFn function within eventLayout lacks the necessary scheduler reference. As discussed in #7659 and #5133, this reference is crucial for certain functionalities. Currently, it leads to undefined behavior, hindering proper customization.
Current Behavior:
In vertical mode:
Expected Behavior:
The layoutFn function within eventLayout should have access to the scheduler reference in both vertical and horizontal modes. For instance:
Additional Notes:
This issue is crucial for ensuring the robustness and flexibility of SchedulerPro, especially in scenarios where custom layouts are necessary. Any insights or updates on this matter would be greatly appreciated.
The text was updated successfully, but these errors were encountered: