logo

/Auto Complete|v2.1.3

Class

new AutoComplete(options)autoComplete.jsline 40

PARAMETERS
NameTypeDescription

options

Object

PROPERTIES
NameTypeDescription

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
NameTypeDescription

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
NameTypeDescription

isUse

Boolean

Whether use auto complete or not

setParams(paramStr, index)autoComplete.jsline 165

Set additional parameters at inputManager.

PARAMETERS
NameTypeDescription

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
NameTypeDescription

queries

Array

Result queries

setSearchApi(options)autoComplete.jsline 270

Reset serachApi

PARAMETERS
NameTypeDescription

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
NameTypeDescription

dataArr

Array

Data array from api server

setValue(keyword)autoComplete.jsline 156

Set inputManager's value to show at search element

PARAMETERS
NameTypeDescription

keyword

String

The string to show up at search element

showResultList()autoComplete.jsline 233

Show search result list area

Events

changeresult.jsline 398

Fired when the user's selected element in result list is changed

closeresult.jsline 146

Fired when hide the result list

Resizable