Hi guys ,
I have a problem when I update my Calendar(change the date event, or pass the event to another user ) the state for the calendar is refreshing, and in my sidebar the users that were already selected come back to the first selection.
In my configuration object, I know I can pre-select users in the sidebar. However, how can we detect changes made to the selected users and trigger an event that saves these changes to the React state and then passes them on to the resourceFilter?
sidebar: {
items: {
// resourceFilter: {
// selected: [state.user.id],
// },
},
},
tbar: {
items: {
label: {
text: "Resource width",
type: "label",
weight: 630,
},
// A slider controlling the width of each resource
viewWidth: {
max: 100,
min: 12,
onInput({ source, value }: { source: Container; value: number }) {
const calendar = source.up("calendar") as CalendarType;
// All views must be synced with the requested resource width
calendar.eachView(
(v: ResourceView) => (v.resourceWidth = `${value}em`)
);
},
showTooltip: true,
showValue: false,
type: "slider",
unit: "em",
value: 40,
weight: 640,
width: 90,
},
},
},