You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/2.0-major-release.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,9 +401,9 @@ The `get` getter has also been updated to work with temp ids. Pass the tempId t
401
401
402
402
The `setCurrent` mutation and `currentId` state encouraged use of a very limiting API. It's much more common for apps to require more than one current record. The `createCopy`, `resetCopy` (formerly called `rejectCopy`), `commitCopy`, and `clearCopy` mutations (since v1.x) provide a more flexible solution for implementing the same functionality. As a result of this, following have been removed from the modules:
Copy file name to clipboardExpand all lines: docs/service-plugin.md
-19Lines changed: 0 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,6 @@ Each service comes loaded with the following default state:
92
92
{
93
93
ids: [],
94
94
keyedById: {}, // A hash map, keyed by id of each item
95
-
currentId:undefined, // The id of the item marked as current
96
95
idField:'id',
97
96
servicePath:'v1/todos'// The full service path
98
97
autoRemove:false, // Indicates that this service will not automatically remove results missing from subsequent requests.
@@ -123,8 +122,6 @@ The following attributes are available in each service module's state:
123
122
124
123
-`ids {Array}` - an array of plain ids representing the ids that belong to each object in the `keyedById` map.
125
124
-`keyedById {Object}` - a hash map keyed by the id of each item.
126
-
-`currentId {Number|String}` - the id of the item marked as current.
127
-
-`copy {Object}` - a deep copy of the current item at the moment it was marked as current. You can make changes to the copy without modifying the `current`. You can then use the `commitCopy` mutation to save the changes as the `current` or `resetCopy` to revert `copy` to once again match `current`. You may prefer to use the new [clone API](./common-patterns.md#Multiple-Copies) for [managing multiple copies with model instances](./common-patterns.md#Multiple-Copies).
128
125
-`servicePath {String}` - the full service path, even if you alias the namespace to something else.
129
126
-`modelName {String}` - the key in the $FeathersVuex plugin where the model will be found.
130
127
-`autoRemove {Boolean` - indicates that this service will not automatically remove results missing from subsequent requests. Only use with feathers-rest. Default is false.
@@ -160,8 +157,6 @@ Service modules include the following getters:
160
157
-`get(id[, params]) {Function}` - a function that allows you to query the store for a single item, by id. It works the same way as `get` requests in Feathers database adapters.
161
158
-`id {Number|String}` - the id of the data to be retrieved by id from the store.
162
159
-`params {Object}` - an object containing a Feathers `query` object.
163
-
-`current {Object}` - the object representing the `currentId`. It's pulled from the `keyedById` state.
164
-
-`getCopy {Object}` - An alias to the `state.copy`.
165
160
166
161
## Service Mutations
167
162
@@ -204,20 +199,6 @@ Removes the passed in items or ids from the store.
204
199
205
200
-`items {Array}` - An array of ids or of objects with ids that will be removed from the data store.
206
201
207
-
### `commitCopy(state)`
208
-
209
-
Saves changes from the `copy` to the `current` item.
210
-
211
-
### `resetCopy(state)`
212
-
213
-
Re-copies the data from `current` to `copy`, restoring the original copy.
214
-
215
-
### `clearCurrent(state)`
216
-
217
-
> Removed in 2.0
218
-
219
-
Clears the `current` item, which also clears the copy.
0 commit comments