how can pass the calendar's project to grid config?
could i use BryntumProjectModel when integration with grid in calendar using the react framework, how to do it if yes, since it has some different with the example like below:
const calendar = new Calendar({})
const unscheduledGrid = new Grid({})
Hi alex,
ok, the data are correctly show in grid like you said, but the drag is invalid, i think i don't set up the relationship in both components correctly.
i installed the grid module by npm separately, whether the calendar module include the grid ? how can i import it if yes.
Ok, I thought you want to share data via 2 components, but in case you just want to have a link to calendar's project in your grid to have an access to the data, you don't need to share same events, but use own store with some data. project will be available on calendar instance, so you can get instance by ref and get project on it (calendarRef.current.instance.project)
as well as create ref for the project itself and get instance in the same manner.
i installed the grid module by npm separately, whether the calendar module include the grid ? how can i import it if yes
yes, it's included but licensed separately. You can get it in a regular way
import {
BryntumCalendar,
BryntumGrid
} from '@bryntum/calendar-react';
ok, i don't want to share the same data between in both components, i want to achieve dragging the item to calendar from the grid like the example(https://bryntum.com/examples/calendar/dragfromgrid/)
I did it like you said, but it show the BryntumGrid is unavailable in calendar-react:
i am not sure whether the grid in calendar-react is the same with it import from @bryntum/grid-react
the BryntumGrid have not the 'project' props like below:
i don't find how can i pass the project of calendar to the Grid.
I did it like you said, but it show the BryntumGrid is unavailable in calendar-react:
That's my mistake. It is not released yet and will be available in 5.0.5 version which we plan to release in next few days.
Right now it's not possible to do, unfortunately.
i don't find how can i pass the project of calendar to the Grid.
Yes, Grid doesn't have project property. You can use references, as I described above.
in addition, how can i pass the references (calendarRef.current.instance.project) to Grid's config, and what‘s the code looks like if you are convenient.
in addition, how can i pass the references (calendarRef.current.instance.project) to Grid's config, and what‘s the code looks like if you are convenient.