Class: InstantSearchResultStyle2

InstantSearchResultStyle2(id, $element)

Instant search result - style 2

Constructor

new InstantSearchResultStyle2(id, $element)

Parameters:
Name Type Description
id String The element ID of search input
$element * The jQuery object of search input element
Source:

Extends

Members

children :Array

Array of child components
Type:
  • Array
Overrides:
Default Value:
  • []
Source:

parent :Component

The parent component
Type:
  • Component
Overrides:
Default Value:
  • null
Source:

Methods

_applyFilterAutocompleteAppendElement()

Append Suggestion box to header if suggestionStyle = style2
Overrides:
Source:

_applyFilterBlockSettings()

Sorting the blocks in result data
Overrides:
Source:

_callAllBindEvents()

Bind events on the component (include all child-components)
Overrides:
Source:

_callAllInit()

Initialize the component (include all child-components)
Overrides:
Source:

_callAllRender()

Render the component (include all child-components)
Overrides:
Source:

_getSuggestionDirection() → {String}

Get direction of instant search result box
Overrides:
Source:
Returns:
Return left OR right
Type
String

_preparePopularProducts(products)

Prepare the popular products for Not found block
Parameters:
Name Type Description
products Object The popular product data
Overrides:
Source:

_renderSuggestion()

Render the result blocks into Instant search dropdown
Overrides:
Source:

_renderSuggestionLoading()

Render Instant search - Loading block
Overrides:
Source:

_renderWrapper()

Setup Classes, Position for Instant search wrapper
Overrides:
Source:

_setSuggestionPosition()

Setup position for Instant search dropdown
Overrides:
Source:

addComponent(childComponent)

Add the child component into a component
Parameters:
Name Type Description
childComponent Object The child component
Overrides:
Source:

afterBindEvents()

After bind evnets on the component
Overrides:
Source:

afterInit()

After initialize callback
Overrides:
Source:

afterRender()

After reder component callback
Overrides:
Source:

beforeBindEvents()

Before bind events on component callback
Overrides:
Source:

beforeInit()

Before initialize callback
Overrides:
Source:

beforeRender()

Before reder component callback
Overrides:
Source:

bindEvents()

Bind events on the component
Overrides:
Source:

compileTemplate() → {String}

Replace the brackets in raw html template with proper values
Overrides:
Source:
Returns:
HTML string
Type
String

getTemplate() → {String}

Get the raw HTML template of instant search result
Overrides:
Source:
Returns:
Raw HTML string
Type
String

init()

Initialize the instant search result component
Overrides:
Source:

isBindEvents()

Returns whether or not binding the events on a component
Overrides:
Source:

isLoopThroughChild()

Returns whether or not the childs of a component is refresh
Overrides:
Source:

isRender()

Returns whether or not the component is rendered
Overrides:
Source:

refresh()

Refresh component
Overrides:
Source:

removeComponent(childComponent)

Remove a child component of a component
Parameters:
Name Type Description
childComponent Object The child component
Overrides:
Source:

render()

Render the result template to DOM
Overrides:
Source:

setData($instantSearchResult, data, isLoading)

Setup data for Instant search box
Parameters:
Name Type Description
$instantSearchResult Object jQuery selector object of Intant search rerult element
data Object The Suggestion result data
isLoading Boolean Render loading block OR result blocks
Overrides:
Source:

(static) isActive()

Returns whether or not this instant search result style is used
Source: