Class: InstantSearchResultBlock

InstantSearchResultBlock(data)

Instant search result - result block

Constructor

new InstantSearchResultBlock(data)

Parameters:
Name Type Description
data Object The result block data
Properties
Name Type Description
type String The block type
status String The block status
number String The max suggest items of block
label String The block label
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

_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:

_isShowDYM()

Return whether or not the DYM of product block is shown
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
Source:
Returns:
HTML string
Type
String

getTemplate(tempTypeopt)

Get the raw HTML template of instant search result block
Parameters:
Name Type Attributes Description
tempType String <optional>
The template type
- 'dym': Get raw HTML template of Did you mean block
- Default: Get raw HTML template of instant search result block
Default Value:
  • Empty
Source:

init()

Initialize the instant search result block 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() → {Object}

Render the instant search result block
Overrides:
Source:
Returns:
jQuery object
Type
Object

setData(data)

Set data for Instant search result block
Parameters:
Name Type Description
data Object The result data of block
Source: