Skip to content

Commit

Permalink
Merge pull request #1456 from rvsia/fixDocumentationTypo
Browse files Browse the repository at this point in the history
Fix documentation typo
  • Loading branch information
Hyperkid123 authored Apr 11, 2024
2 parents 22fbc98 + 6ff530c commit 3e11aee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FieldListener = () => {
return null;
};

const FieldListenerWrapper = () => <FormSpy subcription={{ values: true }}>{() => <FieldListener />}</FormSpy>;
const FieldListenerWrapper = () => <FormSpy subscription={{ values: true }}>{() => <FieldListener />}</FormSpy>;

const schema = {
fields: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import CodeExample from '@docs/code-example';

<DocPage>


# Value listener

This example shows how to update a value of one field according to a value of others without using the set [condition](/schema/condition-set).
Expand All @@ -12,7 +11,7 @@ This example shows how to update a value of one field according to a value of ot

Basically you have to just a set up a new component, that will listen to the form state and updates the intended fields.

**FormSpy** with a correct subscription ensures that the component will be always updated. You can also set the [subcription](/components/renderer#subscription) on the form level in the form renderer.
**FormSpy** with a correct subscription ensures that the component will be always updated. You can also set the [subscription](/components/renderer#subscription) on the form level in the form renderer.

**hideField** ensures that the listener component is not visible in the dom and it won't affect the form layout.

Expand All @@ -26,4 +25,4 @@ Basically you have to just a set up a new component, that will listen to the for

<CodeExample source="components/examples/value-listener" mode="preview" />

</DocPage>
</DocPage>

0 comments on commit 3e11aee

Please sign in to comment.