Our pure JavaScript Scheduler component


Post by Luffy »

HI,
We have use scheduler 2.1 version with the partner.

I have bind "scroll" event and "scrollend" events to window and "scroll" event fired and works fine. But "scrollend" event does not fire.

Image

Did I miss something here?

This is really important since we are trying to load our data partially to bryntum data stores and load new data by capturing "scrollend" event.

Your guidance is highly appreciated.

Anuradha
Attachments
scrollend.JPG
scrollend.JPG (15.88 KiB) Viewed 1788 times

Post by mats »

You should not listen on window. Instead:
scheduler.subGrids.normal.scrollable.on('scrollend', console.log)
Docs: https://bryntum.com/docs/scheduler/#Common/helper/util/Scroller#event-scrollend

Post by Luffy »

Hi Mats,

Thanks for the reply.

I have already tried that code segment but got following typescript errors. It seems the scheduler version that we got, does not have required typings. (We used scheduler-2.1.2 nightly build version)

I have gone through the typings(scheduler.d.ts) and found out there is no subGrids property.
subGrids13.JPG
subGrids13.JPG (37.41 KiB) Viewed 1764 times
subGrids12.JPG.png
subGrids12.JPG.png (14.92 KiB) Viewed 1764 times
Your guidance is highly appreciated.
Best regards,
Anuradha

Post by mats »

Good finding, fixed now in our sources and will be part of next nightly build + release

Post by garysemple »

Hi Mats,
I have download the latest night build (scheduler-2.x-2019-08-26-release) and still no luck with the issue. Have you updated the types? I cant find related types in latest scheduler.d.ts.
subGrids14.JPG
subGrids14.JPG (60.53 KiB) Viewed 1750 times
I have compared "scheduler-2.x-2019-08-26-release" and "scheduler-2.x-2019-08-23-release" types files.They are identicle.

To move forward, we have to have this change.

your help, highly appreciated.

best regards,
Anuradha

Post by mats »

Actually, you could use getSubGrid instead:
/**
     * Returns the subGrid for the specified region.
     * @param {String} region Region, eg. locked or normal (per default)
     * @returns {Grid.view.SubGrid} A subGrid
     * @category SubGrid
     */
    getSubGrid(region) {
        return this.subGrids[region];
    }

Post by Luffy »

Hi Mats,
Thanks for the reply.
I have tried with your suggestion with the following code but didn't have luck. It seems "scrollable" property does not available.
subgrid-33.png
subgrid-33.png (19.12 KiB) Viewed 1741 times
I have bind the "scrollend" event to the subgrid, but the event does not triggered.
subgrid45.JPG
subgrid45.JPG (22.73 KiB) Viewed 1741 times
Best regards,
Anuradha

Post by mats »

Please provide a test case, must be some simple mistake somewhere. You can try this yourself here:https://www.bryntum.com/examples/scheduler/scrollto/

On console:
scheduler.getSubGrid('normal').scrollable.on('scrollend', console.log)

Post by Luffy »

Hi Mats,
Its again problem with the typings.
Please have a look at this error.
scrollable does not exist.png
scrollable does not exist.png (15.27 KiB) Viewed 1740 times
scrollable does not exist4.JPG
scrollable does not exist4.JPG (39.28 KiB) Viewed 1740 times
Best regards,
Anuradha

Post by mats »


Post Reply