Merge pull request #1289 from ing-bank/chore/modelValueMeta

chore: docs for model-value-changed meta
This commit is contained in:
Joren Broekema 2021-03-25 09:02:30 +01:00 committed by GitHub
commit eb63d6cc52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,3 +22,13 @@ level, via:
> recommended as a means of interaction.
For more information about parsing and the Unparseable type, see [Formatting and Parsing](../../../docs/systems/form/formatting-and-parsing.md)
### Event meta
`model-value-changed` events have a `detail` object, containing the following meta data:
- `isTriggeredByUser`: a boolean that determines whether a change originated
from a user or was triggered programmatically
- `formPath`: an array of FormControls. It contains the path an event follows to go from a 'leaf
element' (for instance a lion-input) to a top element (for instance lion-form). An example path
could be [lionForm, lionFieldset, lionInput]