🚨 Announcing Vendure v2 Beta

ProductSelectorComponent

ProductSelectorComponent

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

Example

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

Signature

class ProductSelectorComponent implements OnInit {
  searchInput$ = new Subject<string>();
  searchLoading = false;
  searchResults$: Observable<ProductSelectorSearch.Items[]>;
  @Output() productSelected = new EventEmitter<ProductSelectorSearch.Items>();
  constructor(dataService: DataService)
  ngOnInit() => void;
  selectResult(product?: ProductSelectorSearch.Items) => ;
}

Implements

  • OnInit

Members

searchInput$

property
type:

searchLoading

property
type:

searchResults$

property
type:
Observable<ProductSelectorSearch.Items[]>

productSelected

property
type:

constructor

method
type:
(dataService: DataService) => ProductSelectorComponent

ngOnInit

method
type:
() => void

selectResult

method
type:
(product?: ProductSelectorSearch.Items) =>