Releases: CodeYellowBV/mobx-spine
Releases · CodeYellowBV/mobx-spine
v0.18.1
v0.18.0
v0.16.1
v0.16.0
- Add support for nested backend validation errors; this means that validation errors from a deeply nested model will be properly set on that model, so you can easily show it in the frontend.
- Add
model.setInput(name, value)
, a shorthand for setting user input. This will also clear backend validation errors for this field.
v0.15.2
v0.15.0
- Fix fetching a store when a relation should be converted to snake_case for the backend.
- Breaking change: the model methods
toBackendAttrKey
andfromBackendAttrKey
are static methods now, so if you want to override this you need to do this:
from:
toBackendAttrKey(attrKey) {
return camelToSnake(attrKey);
}
to:
static toBackendAttrKey(attrKey) {
return camelToSnake(attrKey);
}
v0.14.0
- After a successful multi-PUT on a new model, the new id was not saved in the model.
- If
backendResourceName
is set on a model or store, it will try to auto generate theurl
based on that.
Example:
class Animal extends Model {
static backendResourceName = 'animal';
}
const animal = new Animal({ id: 1 });
animal.fetch();
// Will do a request to GET /animal/1/
v0.13.3
v0.13.2
v0.13.1
- Many fixes to deeply nesting relations.
- Make it easy to disable or change the way how mobx-spine does snake_case <-> camelCase converting when parsing from/to backend.
- Throw error when you define an attribute on a model that is already in use by mobx-spine. Example:
@observable url
.