File

projects/storefrontlib/cms-components/navigation/search-box/search-box.events.ts

Description

Indicates that the user chose a product suggestion

Extends

CxEvent

Index

Properties

Properties

freeText
Type : string
productCode
Type : string
Static Readonly type
Type : string
Default value : 'SearchBoxProductSelectedEvent'
Inherited from CxEvent
Defined in CxEvent:23

Event's type

import { CxEvent, Suggestion } from '@spartacus/core';

/**
 * Indicates that the user chose a suggestion
 */
export class SearchBoxSuggestionSelectedEvent extends CxEvent {
  /**
   * Event's type
   */
  static readonly type = 'SearchBoxSuggestionSelectedEvent';
  freeText: string;
  selectedSuggestion: string;
  searchSuggestions: Suggestion[];
}

/**
 * Indicates that the user chose a product suggestion
 */
export class SearchBoxProductSelectedEvent extends CxEvent {
  /**
   * Event's type
   */
  static readonly type = 'SearchBoxProductSelectedEvent';
  freeText: string;
  productCode: string;
}

result-matching ""

    No results matching ""