Skip to content

Commit 0de90a7

Browse files
committed
refer to global config in service-plugin
1 parent 595a837 commit 0de90a7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/service-plugin.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ const servicePlugin = makeServicePlugin({
6262
```
6363
The following options can also be configured in [Global Configuration](getting-started.html#global-configuration) for every service initialized using `feathers-client.js`:
6464

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.
7575

7676
The following options can only configured individually per service plugin
7777

7878
- `servicePath {String}`- Not all Feathers service plugins expose the service path, so it can be manually specified when missing.
7979
- `namespace {String}`, - **Default:** `nameStyle === 'short' ? ${afterLastSlashOfServicePath} : ${stripSlashesFromServicePath}` - Customize the Vuex module name. Overrides nameStyle.
8080
- `modelName {String}` - **Default:** `${ServicePlugin.Model.modelName}`
8181
- `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`
8484
- `created {Function}` - **Default:** `(item, { model, models }) => options.enableEvents` - handle `created` events, return true to add to the store
8585
- `patched {Function}` - **Default:** `(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store
8686
- `updated {Function}` - **Default:** `(item, { model, models }) => options.enableEvents` - handle `created` events, return true to update in the store

0 commit comments

Comments
 (0)