Issue
When the resource ID changes, its display changes and its event disappears.
Implementation to reproduce
import { BryntumScheduler } from "@bryntum/scheduler-react";
const App = () => {
const [data, setData] = useState({
resources: [
{
id: "doing",
name: "doing",
expended: true,
children: [
{
id: "_generatedClassDefEx3",
name: "Nouvelle tâche",
status: "doing",
},
],
},
],
events: [
{
id: 0,
resourceId: "_generatedClassDefEx3",
eventColor: "orange",
startDate: "2022-01-11T23:00:00.000Z",
endDate: "2022-01-12T23:00:00.000Z",
},
],
});
const updateData = () => {
setData({
resources: [
{
id: "doing",
name: "doing",
expended: true,
children: [
{
id: "task1",
name: "Nouvelle tâche",
status: "doing",
},
],
},
],
events: [
{
id: 0,
resourceId: "task1",
eventColor: "orange",
startDate: "2022-01-11T23:00:00.000Z",
endDate: "2022-01-12T23:00:00.000Z",
},
],
})
}
const schedulerConfig = {
columns: [{ field: "name", text: "columnTitle", width: 100, type: "tree" }],
resources: data.resources,
events: data.events,
features: {
tree: true,
},
};
return (
<>
<button onClick={updateData}>post</button>
<BryntumScheduler {...schedulerConfig} />
</>
);
};
export default App;
Thanks for help
Best regards