-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way we can pass events or model to the component ? #33
Comments
You can use the mount function to load the data in, and then return the collection in the events () function. |
is it possible for you to elaborate more on how we can pass data to the events method |
Sure, in your events() function you'd end up with something like this, where you utilise the map function to connect your fields.
You can then reference these mapped fields in your calendar. |
Thanks found a way by passing it into the livewire component the same was you pass the year and month |
You can pass the ID of the model to the $extras property. :extras="['modelName' => $model->id]" In your AppointmentCalendar component you can get the $extras property in the afterMount($extras = []) method. |
I am using it in a list view of users to view calendar for each users , i am thinking if we can pass events or model to the component rather than loading in the component.
The text was updated successfully, but these errors were encountered: