Skip to content

Commit 32dbbec

Browse files
authored
docs(FormWrapper): Add import for code examples
Several people asked how to use the FeathersVuexFormWrapper component, so this should clear up these confusions.
1 parent 211189b commit 32dbbec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/feathers-vuex-form-wrapper.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ The `FeathersVuexFormWrapper` component uses the "clone and commit" pattern to c
4646
</template>
4747
4848
<script>
49+
50+
import { FeathersVuexFormWrapper } from 'feathers-vuex'
51+
4952
export default {
5053
name: 'MyComponent',
54+
components: { FeathersVuexFormWrapper },
5155
props: {
5256
currentItem: {
5357
type: Object,
@@ -85,8 +89,12 @@ Here's another example of how you could use the form wrapper to both save the fo
8589
</template>
8690
8791
<script>
92+
93+
import { FeathersVuexFormWrapper } from 'feathers-vuex'
94+
8895
export default {
8996
name: 'MyComponent',
97+
components: { FeathersVuexFormWrapper },
9098
props: {
9199
currentItem: {
92100
type: Object,
@@ -117,4 +125,4 @@ The default slot contains only four attributes. The `clone` data can be passed
117125
- `clone`: {Object} The cloned record. Each record in the store can have a single clone. The clones are stored on the service's model class, by default.
118126
- `save`: {Function} When called, it commits the data and saves the record (with eager updating, by default. See the `eager` prop.) The save method calls `instance.save()`, internally, so you can pass a params object, if needed.
119127
- `reset`: {Function} When called, the clone data will be reset back to the data that is currently found in the store for the same record.
120-
- `remove`: {Function} When called, it removes the record from the API server and the Vuex store.
128+
- `remove`: {Function} When called, it removes the record from the API server and the Vuex store.

0 commit comments

Comments
 (0)