The dynamicLoading property (boolean) enables the dynamic loading mode in the JavaScript Scheduler, where events are loaded on demand during scrolling using DayPilot.Scheduler.onScroll.
Declaration
DayPilot.Scheduler.dynamicLoadingDefault Value
falseNotes
When this property is enabled, load the events for the current viewport inside DayPilot.Scheduler.onScroll.
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
dynamicLoading: true,
onScroll: async (args) => {
args.async = true;
args.events = [];
args.loaded();
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
dynamicLoading: true,
onScroll: async (args) => {
args.async = true;
args.events = [];
args.loaded();
},
// ...
};React
<DayPilotScheduler
dynamicLoading={true}
onScroll={onScroll}
{/* ... */}
/>const onScroll = async (args) => {
args.async = true;
args.events = [];
args.loaded();
};Vue
<DayPilotScheduler
:dynamicLoading="true"
@scroll="onScroll"
<!-- ... -->
/>const onScroll = async (args) => {
args.async = true;
args.events = [];
args.loaded();
};See Also
Dynamic Event Loading [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot