ZoneSelectorComponent

ZoneSelectorComponent

A form control for selecting zones.

Signature

class ZoneSelectorComponent implements ControlValueAccessor {
  @Output() @Output() selectedValuesChange = new EventEmitter<Zone>();
  @Input() @Input() readonly = false;
  @Input() @Input() transformControlValueAccessorValue: (value: Zone | undefined) => any = value => value?.id;
  selectedId$ = new Subject<string>();
  onChangeFn: (val: any) => void;
  onTouchFn: () => void;
  disabled = false;
  value: string | Zone;
  zones$ = this.dataService
        .query(GetZoneSelectorListDocument, { options: { take: 999 } }, 'cache-first')
        .mapSingle(result => result.zones.items);
  constructor(dataService: DataService, changeDetectorRef: ChangeDetectorRef)
  onChange(selected: Zone) => ;
  registerOnChange(fn: any) => ;
  registerOnTouched(fn: any) => ;
  setDisabledState(isDisabled: boolean) => void;
  focus() => ;
  writeValue(obj: string | Zone | null) => void;
}

Implements

  • ControlValueAccessor

Members

selectedValuesChange

property
type:

readonly

property
type:

transformControlValueAccessorValue

property
type:
(value: Zone | undefined) => any

selectedId$

property
type:

onChangeFn

property
type:
(val: any) => void

onTouchFn

property
type:
() => void

disabled

property
type:

value

property
type:
string | Zone

zones$

property
type:

constructor

method
type:
(dataService: DataService, changeDetectorRef: ChangeDetectorRef) => ZoneSelectorComponent

onChange

method
type:
(selected: Zone) =>

registerOnChange

method
type:
(fn: any) =>

registerOnTouched

method
type:
(fn: any) =>

setDisabledState

method
type:
(isDisabled: boolean) => void

focus

method
type:
() =>

writeValue

method
type:
(obj: string | Zone | null) => void