Skip to main content

ProductVariantSelectorComponent

ProductVariantSelectorComponent

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

Example

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

searchInput$

property

searchLoading

property

searchResults$

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

productSelected

property

constructor

method
(dataService: DataService) => ProductVariantSelectorComponent

ngOnInit

method
() => void

selectResult

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