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
-`serverAlias` - **Default:**`api` - Models are keyed by `serverAlias`. Access the `$FeathersVuex` Plugin and its models in your components by `this.$FeathersVuex.api.${Model}`
297
306
-`keepCopiesInStore` - **Default:**`false` - Set to true to store cloned copies in the store instead of on the Model. <Badgetext="deprecated"type="warning" />
298
-
-`paramsForServer {Array}` - **Default:**`[]` - Custom query operators that are ignored in the find getter, but will pass through to the server.
299
-
-`whitelist {Array}` - **Default:**`[]` - Custom query operators that will be allowed in the find getter.
300
307
301
308
-`idField {String}` - **Default:**`'id'` - The field in each record that will contain the id
302
309
-`tempIdField {Boolean}` - **Default:**`'__id'` - The field in each temporary record that contains the id
310
+
-`nameStyle {'short'|'path'}` - **Default:**`'short'` - Use the full service path as the Vuex module name, instead of just the last section.
303
311
-`debug {Boolean}` - **Default:**`false` - Enable some logging for debugging
304
312
-`addOnUpsert {Boolean}` - **Default:**`false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
305
313
-`autoRemove {Boolean}` - **Default:**`false` - If `true` automatically remove records missing from responses (only use with feathers-rest)
306
-
-`enableEvents {Boolean}` - **Default:**`true` - If `false` socket event listeners will be turned off. See the services [handleEvents API](/service-plugin.html#configuration)
307
314
-`preferUpdate {Boolean}` - **Default:**`false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
308
315
-`replaceItems {Boolean}` - **Default:**`false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
309
316
-`skipRequestIfExists {Boolean}` - **Default:**`false` - For get action, if `true` the record already exists in store, skip the remote request.
310
-
-`nameStyle {'short'|'path'}` - **Default:**`'short'` - Use the full service path as the Vuex module name, instead of just the last section.
317
+
-`paramsForServer {Array}` - **Default:**`[]` - Custom query operators that are ignored in the find getter, but will pass through to the server.
318
+
-`whitelist {Array}` - **Default:**`[]` - Custom query operators that will be allowed in the find getter.
319
+
-`enableEvents {Boolean}` - **Default:**`true` - If `false` socket event listeners will be turned off. See the services
320
+
-`handleEvents {Object}`: For this to work `enableEvents` must be `true`
321
+
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
322
+
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
323
+
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
324
+
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
311
325
312
326
Also see the [Configs per Service](/service-plugin.html#configuration)
@@ -64,14 +68,22 @@ The following options can also be configured in [Global Configuration](getting-s
64
68
65
69
-`idField {String}` - **Default:**`globalConfig: 'id'` - The field in each record that will contain the id
66
70
-`tempIdField {Boolean}` - **Default:**`globalConfig: '__id'` - The field in each temporary record that contains the id
71
+
-`nameStyle {'short'|'path'}` - **Default:**`globalConfig: 'short'` - Use the full service path as the Vuex module name, instead of just the last section.
67
72
-`debug {Boolean}` - **Default:**`globalConfig: false` - Enable some logging for debugging
68
73
-`addOnUpsert {Boolean}` - **Default:**`globalConfig: false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
69
74
-`autoRemove {Boolean}` - **Default:**`globalConfig: false` - If `true` automatically remove records missing from responses (only use with feathers-rest)
70
-
-`enableEvents {Boolean}` - **Default:**`globalConfig: true` - If `false` socket event listeners will be turned off
71
75
-`preferUpdate {Boolean}` - **Default:**`globalConfig: false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
72
76
-`replaceItems {Boolean}` - **Default:**`globalConfig: false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
73
77
-`skipRequestIfExists {Boolean}` - **Default:**`globalConfig: false` - For get action, if `true` the record already exists in store, skip the remote request.
74
-
-`nameStyle {'short'|'path'}` - **Default:**`globalConfig: 'short'` - Use the full service path as the Vuex module name, instead of just the last section.
78
+
-`paramsForServer {Array}` - Custom query operators that are ignored in the find getter, but will pass through to the server.
79
+
-`whitelist {Array}` - Custom query operators that will be allowed in the find getter.
80
+
-`enableEvents {Boolean}` - **Default:**`globalConfig: true` - If `false` socket event listeners will be turned off
81
+
-`handleEvents {Object}`: For this to work `enableEvents` must be `true`
82
+
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
83
+
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
84
+
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
85
+
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
86
+
-
75
87
76
88
The following options can only configured individually per service plugin
77
89
@@ -80,11 +92,6 @@ The following options can only configured individually per service plugin
-`instanceDefaults {Function}` - **Default:**`() => ({})` - Override this method to provide default data for new instances. If using Model classes, specify this as a static class property.
82
94
-`setupInstance {Function}` - **Default:**`instance => instance` - Override this method to setup data types or related data on an instance. If using Model classes, specify this as a static class property.
83
-
-`handleEvents {Object}`: For this to work `enableEvents` must not be `false`
84
-
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
85
-
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
86
-
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
87
-
-`removed {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `removed` events, return true to remove from the store
88
95
89
96
-`state {Object}` - **Default:**: `null` - Pass custom `states` to the service plugin or modify existing ones
90
97
-`getters {Object}` - **Default:**`null` - Pass custom `getters` to the service plugin or modify existing ones
0 commit comments