Purpose
Track whether an <input>, <textarea> or <select> has changed their value from the value they loaded with.
Adds data-dirty to the input being watched if it changes value, and removes it if it returns to its initial value.
| Action | Purpose |
|---|
restore | Return the input to its original value |
| Value | Type | Description | Default |
|---|
- | - | - | - |
Events
| Event | When | Dispatched on | event.detail |
|---|
input-dirtied | - | the input, textarea or select that changed | target: the input that changed |
input-cleaned | - | the input, textarea or select that changed | target: the input that changed |
Side Effects
Adds input and change event listeners to the attached input.
How to Use