ProductVariantSelectorComponent

ProductVariantSelectorComponent

A component for selecting product variants via an autocomplete-style select input.

Example

<vdr-product-variant-selector
  (productSelected)="selectResult($event)"></vdr-product-selector>

Signature

class ProductVariantSelectorComponent implements OnInit {
  searchInput$ = new Subject<string>();
  searchLoading = false;
  searchResults$: Observable<ProductSelectorSearchQuery['search']['items']>;
  @Output() @Output() productSelected = new EventEmitter<ProductSelectorSearchQuery['search']['items'][number]>();
  constructor(dataService: DataService)
  ngOnInit() => void;
  selectResult(product?: ProductSelectorSearchQuery['search']['items'][number]) => ;
}

Implements

  • OnInit

Members

searchInput$

property
type:

searchLoading

property
type:

searchResults$

property
type:
Observable<ProductSelectorSearchQuery['search']['items']>

productSelected

property
type:

constructor

method
type:
(dataService: DataService) => ProductVariantSelectorComponent

ngOnInit

method
type:
() => void

selectResult

method
type:
(product?: ProductSelectorSearchQuery['search']['items'][number]) =>