Updating Owned Item
For a simplified version of what I'm doing I have an actor type called Girl with a data model schema like
{test: new BooleanField({required: true, initial: false})} and an item type called Identity with a data model schema like {marked: new BooleanField({required: true, initial: false})}I have created a Girl and an Identity with its parent set to the Girl. So far so good
in prepareContext on the actor sheet I define among others
In the template for my actor sheet I have a checkbox like so
that works just fine. I can check it and see on the actor the property is changed.
Then I have a list of identities
That renders just fine too. But just like with the checkbox on the Actor itself I want a checkbox that can modify the owned item without having to open the Item sheet and editing the doc that way. This is what I cannot figure out.
I expected this to work:
But it does not. It renders a checkbox yes, but checking it does not update the item when checked. Closing the sheet and opening it again reveals the checkbox still unchecked, and using the console to find the item and check its system.marked property it is still showing false. What am I missing? Any help is appreciated
