FacetValueSelectorComponent
FacetValueSelectorComponent
A form control for selecting facet values.
Example
<vdr-facet-value-selector
(selectedValuesChange)="selectedValues = $event"
></vdr-facet-value-selector>
The selectedValuesChange
event will emit an array of FacetValue
objects.
Signature
class FacetValueSelectorComponent implements OnInit, OnDestroy, ControlValueAccessor {
@Output() selectedValuesChange = new EventEmitter<FacetValueFragment[]>();
@Input() readonly = false;
@Input() transformControlValueAccessorValue: (value: FacetValueFragment[]) => any[] = value => value;
searchInput$ = new Subject<string>();
searchLoading = false;
searchResults$: Observable<FacetValueFragment[]>;
selectedIds$ = new Subject<string[]>();
onChangeFn: (val: any) => void;
onTouchFn: () => void;
disabled = false;
value: Array<string | FacetValueFragment>;
constructor(dataService: DataService, changeDetectorRef: ChangeDetectorRef)
ngOnInit() => void;
ngOnDestroy() => ;
onChange(selected: FacetValueFragment[]) => ;
registerOnChange(fn: any) => ;
registerOnTouched(fn: any) => ;
setDisabledState(isDisabled: boolean) => void;
focus() => ;
writeValue(obj: string | FacetValueFragment[] | Array<string | number> | null) => void;
}
- Implements:
OnInit
,OnDestroy
,ControlValueAccessor
selectedValuesChange
property
readonly
property
transformControlValueAccessorValue
property
(value: FacetValueFragment[]) => any[]
searchInput$
property
searchLoading
property
searchResults$
property
Observable<FacetValueFragment[]>
selectedIds$
property
onChangeFn
property
(val: any) => void
onTouchFn
property
() => void
disabled
property
value
property
Array<string | FacetValueFragment>
constructor
method
(dataService: DataService, changeDetectorRef: ChangeDetectorRef) => FacetValueSelectorComponent
ngOnInit
method
() => void
ngOnDestroy
method
() =>
onChange
method
(selected: FacetValueFragment[]) =>
registerOnChange
method
(fn: any) =>
registerOnTouched
method
(fn: any) =>
setDisabledState
method
(isDisabled: boolean) => void
focus
method
() =>
writeValue
method
(obj: string | FacetValueFragment[] | Array<string | number> | null) => void