Skip to content

Commit

Permalink
docs(form-core): forceDisplayMessage readme
Browse files Browse the repository at this point in the history
  • Loading branch information
feburier-maxime authored and MartinWeb committed Oct 10, 2023
1 parent ac3f4e0 commit f7b3ad7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/Form/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ const FieldForm = () => (
);
export default FieldForm;
```

## forceDisplayMessage

The default behavior prevents HelpMessage from displaying until the user interacts (change or focus event) with Field

You can bypass this behavior to display message anyway by setting the property forceDisplayMessage to true (false by default)

```javascript
<Field id="uniqueId" label="Your Label" forceDisplayMessage />
```

Or

```javascript
<Field id="uniqueId" label="Your Label" forceDisplayMessage={true} />
```

You can add this parameter to **any input from the toolkit** since inputs pass their props to Field

0 comments on commit f7b3ad7

Please sign in to comment.