Repository URL to install this package:
|
Version:
3.0.0-alpha.7 ▾
|
| .. |
| index.ts |
| InputContext.tsx |
| InputState.ts |
| ObserverInput.tsx |
| README.md |
| renderProps.tsx |
| styled.tsx |
| typings.ts |
the following code could come in handy:
/** * using this to check if an input value has been changed * this gets reset when the state is `reset` */ @computed get isDirty(): boolean { // @todo finish // if (this.store.has('isDirty')) { // return this.store.get('isDirty') // } else { // return this.value !== '' && this.value !== undefined // } return this.value !== '' && this.value !== undefined } // typings map = new Map() // @action // setIsDirty(isDirty: boolean): void { // this.store.set('isDirty', isDirty) // }