Our pure JavaScript Scheduler component


Post by mdali602 »

After updating bryntum scheduler pro from v4.0.3 to 5.2.2 few props are giving type error
using Bryntum Scheduler with React(typescript)

Below are the props which are giving errors.

filters={
"associates": [],
"activities": [],
"locations": [],
"groups": [],
"subCategories": [],
"savedFilters": {
"filtersList": []
}
},
updateEvents={updateEvents}, // getting value from a updateEvents function
updateResources={updateResources}, // getting value from a updateResources function
columnAutoWidth={false},
defaultResourceImageName={false},
eventColor={null},
eventStyle={colored},
resourceImageExtension={false},
snapToIncrement={true}

and for below lines getting an error
line1:

scheduler.current.schedulerInstance.refreshRows()

line2:

scheduler.current.schedulerInstance.clearEventSelection()

Error: "Property 'schedulerInstance' does not exist on type 'never'."

Line:

scheduler.current.resourceStore.getById(someId)

Error: Property 'resourceStore' does not exist on type 'never'.

Line:

scheduler.current.eventStore._data

Error: Property 'eventStore' does not exist on type 'BryntumScheduler'


Post by alex.l »

Please check updated guide here https://bryntum.com/products/scheduler/docs/guide/Scheduler/integration/react/guide#using-the-wrapper-in-typescript-application

const App: FunctionComponent = () => {
    const schedulerRef = useRef<BryntumScheduler>(null);
    const schedulerInstance = () => schedulerRef.current?.instance as Scheduler;

return (
    <Fragment>
        <BryntumScheduler
            ref = {schedulerRef}
            {...schedulerConfig}
        />
    </Fragment>
);
};

All the best,
Alex


Post by mdali602 »

I went through the above documentation did the required changes but still getting error
Sharing the Screenshot of the error

Attachments
Bryntum-error-1.1.PNG
Bryntum-error-1.1.PNG (41.21 KiB) Viewed 722 times
Bryntum-error-1.PNG
Bryntum-error-1.PNG (27.62 KiB) Viewed 722 times

Post by tasnim »

Could you please provide us a runnable test case so we can reproduce and debug it?


Post by mdali602 »

Hi Tasnim,

As you asked, I'm sharing the runnable test repo link.
Basically I replicated the issue in a separate github repo (https://github.com/mdali602/bryntum-app)
You can run this this code simply running below two commands
$npm i
$npm start

After running this, There you can see the typescript errors.


Post by marcio »

Hey mdali602,

We don't have a horizontalColumns property, only columns. I attached a print from our documentation to confirm.

Also, I checked in our API diff tool https://bryntum.com/products/schedulerpro/docs/api/apidiff and we don't have a horizontalColumns property on 4.0.2 as well, where did you see that configuration??

Attachments
Screenshot 2022-12-05 at 16.38.59.png
Screenshot 2022-12-05 at 16.38.59.png (67.82 KiB) Viewed 657 times

Best regards,
Márcio


Post by mdali602 »

Hi,

we're curios to know How frequently we should update the bryntum version asking because we found a lot of major changes between bryntum scheduler v4.0.2 and bryntum scheduler pro v5.2.2.

Please let us know what is the preferred interaval of upgradation you suggest ?

Thanks


Post by mats »

Ideally you upgrade frequently, it's easier to do small updates than to jump 10 versions in one upgrade. It's expected to find major changes happening in major releases, so need to take extra care when doing a major upgrade and study our upgrade guides and info.


Post by mdali602 »

Hi Bryntum Team,
Facing some issues in bryntum latest version. I tried to create a runnable test I was not able to install bryntum scheduler on an online plateform stackblitz . I also tried replicating in fresh repo but Its difficult to replicate there.

So Is this possible we can connect on a virtual call ?


Post by marcio »

Hey mdali602,

You can send an email to support[at]bryntum.com for discussing a virtual call to assist you.

Best regards,
Márcio


Post Reply