Item label (auto-completion)

Description

Name of a field to be displayed in input field after a suggestion is selected.

Default value

itemLabel: 'value'

Examples

Display title field from value object in input field where suggestion structure is:

[{
    label: 'This is suggestion label',
    value: {
    	title: 'This is title',
    	desc: 'This is description'
    }
}]
itemLabel: 'value.title'

Display first and last name in input field where suggestion structure is:

[{
    label: {
    	firstname: 'John',
    	lastanme: 'Doe'
    },
    value: 'jdoe'
}]
 itemLabel: function(suggestion) {
    return suggestion.label.firstname + " " + suggestion.label.lastname;
}

See also