bbbfly. ListSearchBox class control

new bbbfly.ListSearchBox (def, ref, parent)

Parameters

Name Type Description
def bbbfly.ListSearchBox.Definition optional Descendant definition
ref object optional Reference owner
parent object | string optional Parent DIV element or it's ID

Properties

Name Type Default Description
ListID string null bbbfly.List to search in ID
DownImg bbbfly.Renderer.image null Down button image
UpImg bbbfly.Renderer.image null Up button image

Extends

In Packages

Methods

CompareItem (list, item, text){boolean}

Parameters:
Name Type Description
list bbbfly.List Searched list
item ngListItem Searched list item
text string Searched text
Returns:
Type Description
boolean If item matches searched text
Parameters:
Name Type Description
buttonId string Required button's ButtonId
Returns:
Type Description
bbbfly.Edit.Button | null - Button with passes ButtonId

abstract GetItemText (item){string}

Return text which should be searched in.
Parameters:
Name Type Description
item ngListItem
Returns:
Type Description
string Searchable item text
Search for passed text or text filled in edit.
Parameters:
Name Type Description
text string optional Edit text will be used if undefined
See:
Returns:
Type Description
boolean If text was valid
Focus edit with caret at the text end.
See:

inherited SetFocusBefore ()

Focus edit with caret at the text begining.
See:

SetSearchList (list){boolean}

Parameters:
Name Type Description
list bbbfly.List
Returns:
Type Description
boolean If list was valid

inherited SetSearchResults (results){boolean}

Parameters:
Name Type Description
results bbbfly.SearchEdit.searchResults
See:
Returns:
Type Description
boolean If results were valid

Events

inherited OnInvalidChanged ()

inherited OnNoSearchResults ()

Called when nothing was found.
See:

inherited OnSearch (text){boolean}

Parameters:
Name Type Description
text string
See:
Returns:
Type Description
boolean If continue to search

inherited OnSearchResults (results)

Called when any anything was found.
Parameters:
Name Type Description
results bbbfly.SearchEdit.searchResults
See: