Our pure JavaScript Scheduler component

Post by burnit »


i have to create a new thread, sorry.

Please take your react + redux example and add this code under the transformResponse part in the data.js file.

    async onCacheEntryAdded(arg, { updateCachedData, cacheDataLoaded, cacheEntryRemoved }) {
                try {
                    // wait for the initial query to resolve before proceeding
                    await cacheDataLoaded;
// when data is received from the socket connection to the server, // if it is a message and for the appropriate channel, // update our query result with the received message const newData = /* import here youre new dataset */ setTimeout(() => { updateCachedData((draft) => { return [newData]; }, 5000); }); } catch (e) { console.log(e); // no-op in case `cacheEntryRemoved` resolves before `cacheDataLoaded`, // in which case `cacheDataLoaded` will throw } // cacheEntryRemoved will resolve when the cache subscription is no longer active await cacheEntryRemoved; // perform cleanup steps once the `cacheEntryRemoved` promise resolves },

You should get following error message: Uncaught TypeError: Cannot add property expanded, object is not extensible

Can you reproduce it?

Post by marcio »

Hey burnit,

I added that to the last version demo and the query didn't trigger any error (check the screenshot).

Which version are you using?

Screenshot 2023-01-30 at 16.16.51.png
Screenshot 2023-01-30 at 16.16.51.png (249.82 KiB) Viewed 83 times

Best regards,

Post by burnit »

Hi Márcio,

can you please send me your test demo?

I would like to test it on our side.

We are currently using version 5.2.3

Greetings André

Post by marcio »

Hey André,

I'm sharing the advanced demo code, but you also have the source code of that one in the SchedulerPro package.

(2.49 MiB) Downloaded 2 times

Best regards,

Post Reply