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
The following options can also be configured in [Global Configuration](getting-started.html#global-configuration) for every service initialized using `feathers-client.js`:
64
64
65
-
-`idField {String}` - **Default:**`'id'` - The field in each record that will contain the id
66
-
-`tempIdField {Boolean}` - **Default:**`'__id'` - The field in each temporary record that contains the id
67
-
-`debug {Boolean}` - **Default:**`false` - Enable some logging for debugging
68
-
-`addOnUpsert {Boolean}` - **Default:**`false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
69
-
-`autoRemove {Boolean}` - **Default:**`false` - If `true` automatically remove records missing from responses (only use with feathers-rest)
70
-
-`enableEvents {Boolean}` - **Default:**`true` - If `false` socket event listeners will be turned off
71
-
-`preferUpdate {Boolean}` - **Default:**`false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
72
-
-`replaceItems {Boolean}` - **Default:**`false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
73
-
-`skipRequestIfExists {Boolean}` - **Default:**`false` - For get action, if `true` the record already exists in store, skip the remote request.
74
-
-`nameStyle {'short'|'path'}` - **Default:**`'short'` - Use the full service path as the Vuex module name, instead of just the last section.
65
+
-`idField {String}` - **Default:**`globalConfig: 'id'` - The field in each record that will contain the id
66
+
-`tempIdField {Boolean}` - **Default:**`globalConfig: '__id'` - The field in each temporary record that contains the id
67
+
-`debug {Boolean}` - **Default:**`globalConfig: false` - Enable some logging for debugging
68
+
-`addOnUpsert {Boolean}` - **Default:**`globalConfig: false` - If `true` add new records pushed by 'updated/patched' socketio events into store, instead of discarding them.
69
+
-`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
+
-`preferUpdate {Boolean}` - **Default:**`globalConfig: false` - If `true`, calling `model.save()` will do an `update` instead of a `patch`.
72
+
-`replaceItems {Boolean}` - **Default:**`globalConfig: false` - If `true`, updates & patches replace the record in the store. Default is false, which merges in changes.
73
+
-`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.
75
75
76
76
The following options can only configured individually per service plugin
77
77
78
78
-`servicePath {String}`- Not all Feathers service plugins expose the service path, so it can be manually specified when missing.
-`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
-
-`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}`
82
+
-`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
84
-`created {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
85
85
-`patched {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
86
86
-`updated {Function}` - **Default:**`(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
0 commit comments