Constructor
new ToolbarRenderer()
To create an instance, use factory method App.searchV2.createToolbarRenderer
Requires:
Requires
Methods
addDeleteSearchEvent(deleteCallback)
Registers delete search event.
Parameters:
Name | Type | Description |
---|---|---|
deleteCallback |
function | Callback function to called on when search is deleted |
addDoSearchEvent(deleteCallback)
Registers do search event on all search elements.
Parameters:
Name | Type | Description |
---|---|---|
deleteCallback |
function | Callback function to called on when search is deleted |
addDoSearchEventOnSearchIcon(search, deleteCallback)
Registers do search event on search element.
Parameters:
Name | Type | Description |
---|---|---|
search |
Object | Reference search element |
deleteCallback |
function | Callback function to called on when search is deleted |
addEnableButtonsOnFieldSelectEvent()
Registers enable buttons event.
addLoadSearchEvent(drop, loadCallback)
Registers load search event.
Parameters:
Name | Type | Description |
---|---|---|
drop |
Object | Reference to drop item |
loadCallback |
function | Callback function to called on when search is loaded |
addNoSearchHtml()
Adds 'No Search' html element to load searches menu.
addSearch(search, doSearchCallback)
Adds search to load searches menu.
Parameters:
Name | Type | Description |
---|---|---|
search |
Object | search to be added to load searches menu. |
doSearchCallback |
function | callback function to execute search when search icon on saved search is clicked. |
closeSaveSearch()
Closes the saved search drop
destroy()
Performs clean up of references
getApi() → {Object}
Returns API methods for this class
Returns:
- object of api functions
- Type
- Object
getLoadSearchHtml(savedSearches) → {string}
Returns html content to show load search menu.
Parameters:
Name | Type | Description |
---|---|---|
savedSearches |
Array | Array of saved search objects. |
Returns:
- Html of load saved searches menu
- Type
- string
getSaveSearchHtml(options) → {string}
Returns html content to show save search dialog.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | any inputs from server side to return condition html |
Returns:
- Html of save search dialog
- Type
- string
isSearchMenuLoaded() → {boolean}
Whether search menu is loaded.
Returns:
- Type
- boolean
registerLoadSearchDropEvents(drop, callbacks)
Registers callbacks on load search drop menu.
Parameters:
Name | Type | Description |
---|---|---|
drop |
Object | UIP Toolbar item drop element. |
callbacks |
Object | Callback functions to be called when user load or deletes a saved search . |
registerSaveSearchDropEvents(drop, saveSearchCallback)
Registers callbacks on save search.
Parameters:
Name | Type | Description |
---|---|---|
drop |
Object | UIP Toolbar item drop element. |
saveSearchCallback |
function | object which contains different callback functions to be called when user saves a search. |
removeDeleteSearchEvent()
Unregisters delete search event.
removeLoadSearchEvent()
Unregisters load search event.
removeNoSearchHtml()
Removes 'No Search' html element from load searches menu.
removeSaveSearchDropEvents()
Removes events registered on save search element.
removeSearch(searchId)
Removes search from load searches menu.
Parameters:
Name | Type | Description |
---|---|---|
searchId |
string | id of search to be removed from load searches menu. |