Forien
TTyphonJS
•Created by Forien on 9/12/2023 in #typhonjs-runtime
TJSDocument not working properly with Module Sub-Types (Data Models)
In Foundry, modules can define a Sub-Types using Data Models.
On Data Models we can also define functions. We can also update the parent document using
this.updateSource()
, for example:
this however, does not update TJDocument
and does not update the Store.
Changing the function to updating the parent, however, works:
From what I can tell, the DataModel#updateSource
does not call any Hooks, which might be why.
I think it's worth investigating if there is a way of making DataModel#updateSource
triggering the Store in TJSDocument to update.4 replies