You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a record is added to resourceStore with the same id as an already existing record, the existing record is replaced by the new one which breaks its relation to resourceTimeRangeStore record.
scheduler.resourceStore.add( { id : 'r1', name : 'Mock' });
drag the first event
The existing resource time range disappears. The situation should be handled, either by removing resource time range record or updating behind the scenes.
Im running a useEffect hook where im dynamically updating resourceData (1 to many fields) using the resourceStore.addAsync() function it removes that resources resourceTimeRange.
Ive tried a few workArounds, and the only one that seems to work is the very bruteforcy way of doing a setAsync(); func on the Resource itself, which seems wrong to me.
where Ive changed the "add resource" btn onclick to this:
onAction : () => {
scheduler.resourceStore.add( { id : 'r1', name : 'Mock' });
scheduler.resourceStore.add( { id : 'r2', name : 'Mock' });
}
It looks fine when u click it (the name changes of the resource) but when u interact with the scheduler (either moving timeRanges to lunch or just simply moving an event) the resources timeRanges disapear.
-----OurImplementation-----
the project is set up like this:
project: {
eventStore: new EventStore(),
resourceStore: new ResourceStore(),
resourceTimeRangeStore: new ResourceTimeRangeStore(),
},
jsakalos
changed the title
[REACT] adding to resourceStore and resourceTimeRangeStore doesnt update reference
adding to resourceStore and resourceTimeRangeStore doesnt update reference
May 20, 2021
I was trying with 'loadDataAsync' and 'addAsync' to update ResourceStore.
When I use 'loadDataAsync' there is a flicker after polling
When I use 'addAsync' flicker is gone but ResourceTimeranges disappear on polling. any idea?
matsbryntse
changed the title
adding to resourceStore and resourceTimeRangeStore doesnt update reference
Adding to resourceStore and resourceTimeRangeStore doesnt update reference
Aug 15, 2023
Wow so happy to see that it's ready for review. Would really appreciate it if it's online and available. Because the scenario is very irritating for our customers.
We do have a Premium Account but I messaged here since I think my Issue is well explained here.
When a record is added to
resourceStore
with the same id as an already existing record, the existing record is replaced by the new one which breaks its relation toresourceTimeRangeStore
record.Steps to reproduce:
The existing resource time range disappears. The situation should be handled, either by removing resource time range record or updating behind the scenes.
Forum post
Hey!
Im running a useEffect hook where im dynamically updating resourceData (1 to many fields) using the resourceStore.addAsync() function it removes that resources resourceTimeRange.
Ive tried a few workArounds, and the only one that seems to work is the very bruteforcy way of doing a setAsync(); func on the Resource itself, which seems wrong to me.
I have recreated this issue in https://bryntum.com/examples/scheduler/resourcetimeranges/
where Ive changed the "add resource" btn onclick to this:
It looks fine when u click it (the name changes of the resource) but when u interact with the scheduler (either moving timeRanges to lunch or just simply moving an event) the resources timeRanges disapear.
-----OurImplementation-----
the project is set up like this:
the "this should work" tries
The text was updated successfully, but these errors were encountered: