mobx-keystone
Advanced tools
Changelog
0.55.0
setterAction: true
prop option is now prop().withSetter()
setterAction: "assign"
prop option is now prop().withSetter("assign")
ModelPropsData
/ ModelInstanceData
-> ModelData
, ModelPropsCreationData
/ ModelInstanceCreationData
-> ModelCreationData
.onSnapshot
now also takes a function that returns a node.valueType
option to Model
/ExtendedModel
so that class models of that kind automatically get auto-cloned when assigned to a property/array/etc., useful for example for primitive data structures such as points, colors, etc. Check the relevant section of the docs for more infoChangelog
0.54.0
withGroupFlow
to UndoManager
so that several async actions can be undone/redone as a single step.Changelog
0.53.0
setterAction: true
prop option will now generate a setter like setX
automatically instead of making the property assignable. To get the old behaviour use setterAction: "assign"
instead.setterActions
now just take the field names rather than an object with the setter mapping.ExtendedModel
with abstract classes in TypeScript 4.2.0.Changelog
0.52.0
withGroup
to UndoManager
so that several sync actions can be undone/redone as a single step.Changelog
0.51.0
withoutUndo
and isUndoRecordingDisabled
to UndoManager
. Consider using those instead of the global withoutUndo
if more precision over which UndoManager
to skip recording to is needed.Changelog
0.50.0
$modelId
by assigning to a property the new idProp
value. In any case, model instances can still use model.$modelId
to read/write this custom property if desired.Changelog
0.49.0
withSandbox
method now requires an array of nodes from the original tree and the corresponding sandbox nodes are now positional arguments of the callback function.applySnapshot
with hot reloading.Changelog
0.48.5
$modelId
is now an enumerable property though).assign
to fnObject
.Changelog
0.48.4
ExtendedModel
will now throw when the baseModel
argument is not a model class.