Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / src / new-forms / inputs
  ..
  index.ts
  InputContext.tsx
  InputState.ts
  ObserverInput.tsx
  README.md
  renderProps.tsx
  styled.tsx
  typings.ts
Size: Mime:

Inputs

  • standard style structure

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)
  // }