Our pure JavaScript Scheduler component


Post by manirajan s »

Hi Krona,

I have integrated useMemo as per your suggestion. However, even after that, the data changes are not syncing — it is still emitting the entire dataset, as mentioned earlier. I have attached a payload screenshot for your reference.

Wrong_payload.png
Wrong_payload.png (65.57 KiB) Viewed 87 times

In the console log, scheduler.crudManager.changes is showing correctly, but the data is still not syncing.

console_scheduler_crudmanager.png
console_scheduler_crudmanager.png (52.95 KiB) Viewed 87 times

I’m also sharing the code block for your review. Kindly go through it and guide me on how to proceed.

index.zip
(5.8 KiB) Downloaded 8 times

Post by alex.l »

Hi,

Payload doesn't look like event records to me.
We need to check that at runtime I am afraid. Please attach runnable demo, instructions how to build and run, steps to reproduce, actual and expected result described.

Thank you!

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by manirajan s »

Hi Alex,

It’s not possible for me to share runnable code due to runtime dependencies.

However, I’m also facing an issue when adding events via drag-and-drop. I’ve described the issue and shared the relevant code snippet in the forum post linked below:

viewtopic.php?p=168640#p168640

I’m trying to remove events when clicking on “Unassigned” and add new events via drag-and-drop. During the sync call, these changes (removed or newly added events) should reflect correctly in the CRUD manager.

Currently, the events added via drag-and-drop do not persist after sync, and events removed by clicking "Unassigned" are not cleared from the store.
Could someone guide me on,
How to properly remove events from the store when clicking on "Unassigned"?
How to correctly add events during drag-and-drop so they are retained and synced via the CRUD manager?


Post by ghulam.ghous »

I have replied you on the other post.

events removed by clicking "Unassigned" are not cleared from the store

Have you set the https://bryntum.com/products/schedulerpro/docs/api/Scheduler/data/mixin/EventStoreMixin#config-removeUnassignedEvent config on the event store?

How to correctly add events during drag-and-drop so they are retained and synced via the CRUD manager?

Let's keep this discussion on the other forum thread you just mentioned.


Post by manirajan s »

Hi Ghulam,

Where should we add removeUnassignedEvent? Is it available in the version we are currently using as shown in the image below

package.png
package.png (8.34 KiB) Viewed 60 times

Post by ghulam.ghous »

I am assuming the event assignment related operations are happening in schedulerPro so it should be added there.

new schedulerPro({
      project : {
           eventStore : { removeUnassignedEvent : true}
      } 
})

Yes it is available in the versions mentioned by you.


Post by manirajan s »

Hi Ghulam,

Even i have added the code you suggested also the same happening

const [eventStoreConfig, setEventStoreConfig] = useState({
    // listeners: {},
    removeUnassignedEvent : true,
});
  
eventStore={eventStoreConfig}

Post by marcio »

Hey manirajan,

It seems like you're correctly setting the removeUnassignedEvent configuration on the event store. Ensure that the eventStoreConfig is properly linked to the Scheduler's event store. You might want to verify that the configuration is being applied correctly by checking the event store instance after initialization.

Additionally, make sure that the unassignEventFromResource function is being called correctly and that the event store is updated accordingly. You can log the event store's state after the operation to ensure the event is being removed.

If the issue still persists, please provide more details or code snippets showing how the event store is initialized and linked to the Scheduler. This will help in diagnosing the problem further.

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post Reply