Stay organized with collections
Save and categorize content based on your preferences.
SearchBoxAdapter
interface
The Adapter of search box
Methods
createSuggestionElement
createSuggestionElement(suggestion) returns Element
Implement this method to override rendering of a suggestion.
Parameter
suggestion
Object
A suggestion object from response
Value must not be null.
Returns
non-null Element element Element built based on a suggestion.
decorateSuggestionElement
decorateSuggestionElement(element, suggestion)
Implement this method to decorate a suggestion, such as change CSS.
Parameter
element
Element
Element you can decorate on
Value must not be null.
suggestion
Object
A suggestion object from response
Value must not be null.
interceptSuggestRequest
interceptSuggestRequest(request) returns Object
Implement this method to add extra params in request.
Parameter
request
Object
The original request
Value must not be null.
Returns
non-null Object request The updated request
interceptSuggestResponse
interceptSuggestResponse(response)
Implement this method to read the suggest response prior to rendering. The
response object is read-only. If the call fails, the response
will contain the error.
If a new suggest request is issued while one is pending, the previous
request is cancelled and the method is not called.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-18 UTC."],[],[],null,["# Interface: SearchBoxAdapter\n\nSearchBoxAdapter\n================\n\ninterface\n\nThe Adapter of search box\n\nMethods\n-------\n\n### createSuggestionElement\n\ncreateSuggestionElement(suggestion) returns Element\n\nImplement this method to override rendering of a suggestion.\n\n| #### Parameter ||\n|------------|------------------------------------------------------------------|\n| suggestion | Object A suggestion object from response Value must not be null. |\n\nReturns\n\n: `non-null Element` element Element built based on a suggestion.\n\n### decorateSuggestionElement\n\ndecorateSuggestionElement(element, suggestion)\n\nImplement this method to decorate a suggestion, such as change CSS.\n\n| #### Parameter ||\n|------------|------------------------------------------------------------------|\n| element | Element Element you can decorate on Value must not be null. |\n| suggestion | Object A suggestion object from response Value must not be null. |\n\n### interceptSuggestRequest\n\ninterceptSuggestRequest(request) returns Object\n\nImplement this method to add extra params in request.\n\n| #### Parameter ||\n|---------|-----------------------------------------------------|\n| request | Object The original request Value must not be null. |\n\nReturns\n\n: `non-null Object` request The updated request\n\n### interceptSuggestResponse\n\ninterceptSuggestResponse(response)\n\nImplement this method to read the suggest response prior to rendering. The\nresponse object is read-only. If the call fails, the response\nwill contain the error.\n\nIf a new suggest request is issued while one is pending, the previous\nrequest is cancelled and the method is not called.\n\n| #### Parameter ||\n|----------|-----------------------------------------------------|\n| response | Object The suggest response Value must not be null. |"]]