Skip to content

Rollback Attributes #235

@michaeljymsgutierrez

Description

@michaeljymsgutierrez

Ability to reset attributes of record without triggering a network request.
Typically collection record has reload function which enable getting the fresh data from the server.

// Trigger GET /resource-name/:id
record.reload()

Now, rollbackAttributes does the same thing except it get the record from the last request made that return the record.

// Does not trigger GET /resource-name/:id instead it rollback the attributes based on its last fetched or returned from any updates
record.rollbackAttributes()

Metadata

Metadata

Labels

No labels
No labels

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions