Hi,
There seems to be some issue with resource view order. The initial resources are loaded correctly, but after appyling server side sorting or updating the resources, the resources order is not changing even if the state value gets updated. I am using bryntum scheduler react wrapper in nextjs using @bryntum/scheduler-react. Can you try to check if the same is happening for the following updates. I am maintaining a separate state for resources and events and just passing them as props. I am just sharing a small snippet here using which you can reproduce the issue. Also, i am not passing any custom sort method to resourceStore.
The same works fine when i pass resources directly into resourceStore as follows:
resourceStore={{data:resources}} but this causes some rerendering issues with large data.
let dummyResources=[
{ id: 'r1', name: 'test1', role: 'test1' },
{ id: 'r2', name: 'test2', role: 'test2' },
{ id: 'r3', name: 'test3', role: 'test3' };
]
const [resources, setResources]= useState<any>(dummyResources);
return (<>
<button onClick={()=>{
setResources([...dummyResources.reverse()])
}}>Update</button>
<BryntumScheduler
ref={scheduler}
{...defaultProps}
resources={resources}
events={events}
/>
</>
)