Goal: Run a "Bulk Update via Primary Key" OR a "Update an existing record" with the changeset of the Calendar component.
Steps:
Created a calendar and added data.
Created an "On Change" event tied to a "bulk update via primary key" SQL
Set the SQL array to calendar.changeset
Details: The issue is that the change-set is an object not an array. I can run it through a transformer but that seems like unnecessary extra steps. Shouldn't the change-set act similar to the table component?
What is the recommended way to setup a Calendar component with on change events? The demo linked in the documentation seems to work well, but the docs are not descriptive enough to see what is going on.
@kyleteal
The name of the event in the Calendar component is "ChangeEvent," not "ChangeEvents," implying that it pertains to the alteration of a single event at a time. Therefore, in your query, the action type should be "Update an existing record" rather than "Bulk update via a primary key".
But unfortunately those keys do not match my database schema, so a transformer will be needed anyways it seems. It would be great if the keys matched the inputs, for example in the calendar start input I have {{ item.event_start }} so ideally the changeset would inherit that event_start instead of start. This is how the table works I believe. But I will make do with it as implemented.