new AutoComplete(options)autoComplete.jsline 40
PARAMETERS
Name Type Description options
Object
PROPERTIES
Name Type Description usageStatistics
Boolean = true
Let us know the hostname. If you don't want to send the hostname, please set to false.
EXAMPLES
CommonJS
var AutoComplete = require('tui-auto-complete'); var autoComplete = new AutoComplete({'config': 'Default'});
Global Namespace
var autoComplete = new tui.AutoComplete({"config" : "Default"});
Arguments of AutoComplete Constructor
SAMPLE FILE: [AutoConfig.json]{@link http://nhnent.github.io/tui.auto-complete/latest/dist/src/js/autoComplete.js}
Instance Methods
clearReadyValue()autoComplete.jsline 277
clear ready value and set idle state
getValue()autoComplete.jsline 148
Return string in input element.
RETURNS:
{String
}
hideResultList()autoComplete.jsline 226
Hide search result list area
isShowResultList()autoComplete.jsline 210
Whether show the result list area or not.
RETURNS:
{Boolean
}
isUseAutoComplete()autoComplete.jsline 202
Get whether use auto complete or not
RETURNS:
{Boolean
}EXAMPLES
autoComplete.isUseAutoComplete(); => true|false
request(keyword)autoComplete.jsline 140
Request data at api server with keyword
PARAMETERS
Name Type Description keyword
String
The key word to send to Auto complete API
setCookieValue(isUse)autoComplete.jsline 181
Set Cookie value with whether use auto complete or not
PARAMETERS
Name Type Description isUse
Boolean
Whether use auto complete or not
setParams(paramStr, index)autoComplete.jsline 165
Set additional parameters at inputManager.
PARAMETERS
Name Type Description paramStr
string
String to be addition parameters.(saperator '&')
index
string
The index for setting key value
setQueries(queries)autoComplete.jsline 191
Save matched queries from server.
PARAMETERS
Name Type Description queries
Array
Result queries
setSearchApi(options)autoComplete.jsline 270
Reset serachApi
PARAMETERS
Name Type Description options
Object
searchApi option
EXAMPLES
autoComplete.setSearchApi({ 'st' : 111, 'r_lt' : 111, 'r_enc' : 'UTF-8', 'q_enc' : 'UTF-8', 'r_format' : 'json' });
setServerData(dataArr)autoComplete.jsline 173
Request to draw result at resultManager with data from api server.
PARAMETERS
Name Type Description dataArr
Array
Data array from api server
setValue(keyword)autoComplete.jsline 156
Set inputManager's value to show at search element
PARAMETERS
Name Type Description keyword
String
The string to show up at search element
showResultList()autoComplete.jsline 233
Show search result list area