GitHub

DaffQuantityInputComponent

import { DaffQuantityInputComponent } from '@daffodil/design'

@Component()
class DaffQuantityInputComponent implements OnInit, OnDestroy {
  @ViewChild() input: DaffInputComponent
  _inputControl: UntypedFormControl = new UntypedFormControl()
  get focused(): boolean
  _destroyed: Subject = new Subject()
  value
  get disabled(): boolean
  ngControl: NgControl

  @Input() min: number = 1
  @Input() max: number = 10

  ngOnInit(): void
  ngOnDestroy(): void
  focus(): void
  onFocus(): void
  onBlur(): void
  onValueChange(e: any): void
}

Properties

input
DaffInputComponent
Default
Description
_inputControl
UntypedFormControl
Defaultnew UntypedFormControl()
Description

A new control for the nested native input. We don't bind the native input directly to the inherited form control to avoid triggering updates on the input event. Instead, we listen for the change event and manually patch form control values.

focused
boolean
Default
Description
_destroyed
Subject
Defaultnew Subject()
Description
value
Default
Description
disabled
boolean
Default
Description
ngControl
NgControl
Default
Description

() Methods

ngOnInit
void
ngOnDestroy
void
focus
void
onFocus
void
onBlur
void
onValueChange
void

Callback function fired when the value changes. Used to pass the value back up to the ngControl.

Parameters
Parametere: any
Description

Inputs

min
number
Default1
Description
max
number
Default10
Description