logo

/Auto Complete|v2.1.5

Class

new AutoComplete(options)autoComplete.jsline 39

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 https://github.com/nhn/tui.auto-complete/blob/master/src/js/autoComplete.js}

Instance Methods

clearReadyValue()autoComplete.jsline 284

clear ready value and set idle state

getValue()autoComplete.jsline 155

Return string in input element.

RETURNS:
{

String

}

hideResultList()autoComplete.jsline 233

Hide search result list area

isShowResultList()autoComplete.jsline 217

Whether show the result list area or not.

RETURNS:
{

Boolean

}

isUseAutoComplete()autoComplete.jsline 209

Get whether use auto complete or not

RETURNS:
{

Boolean

}
EXAMPLES
autoComplete.isUseAutoComplete(); => true|false

request(keyword)autoComplete.jsline 147

Request data at api server with keyword

PARAMETERS
NameTypeDescription

keyword

String

The key word to send to Auto complete API

setCookieValue(isUse)autoComplete.jsline 188

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 172

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 198

Save matched queries from server.

PARAMETERS
NameTypeDescription

queries

Array

Result queries

setSearchApi(options)autoComplete.jsline 277

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 180

Request to draw result at resultManager with data from api server.

PARAMETERS
NameTypeDescription

dataArr

Array

Data array from api server

setValue(keyword)autoComplete.jsline 163

Set inputManager's value to show at search element

PARAMETERS
NameTypeDescription

keyword

String

The string to show up at search element

showResultList()autoComplete.jsline 240

Show search result list area

Events

changeresult.jsline 415

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

closeresult.jsline 149

Fired when hide the result list

Resizable