mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
Add callbacks for search panel opening and closing
This commit is contained in:
@ -4,5 +4,31 @@
|
||||
*/
|
||||
|
||||
/* exported
|
||||
closeSearchPanel,
|
||||
openSearchPanel,
|
||||
*/
|
||||
|
||||
|
||||
function closeSearchPanel() {
|
||||
|
||||
// TODO
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Callback when the search panel is opened.
|
||||
* Ensure the panel is in a known state
|
||||
*/
|
||||
function openSearchPanel() {
|
||||
|
||||
var panel = $('#offcanvas-search');
|
||||
|
||||
// Ensure the 'no results found' element is visible
|
||||
panel.find('#search-no-results').show();
|
||||
|
||||
// Finally, grab keyboard focus in the search bar
|
||||
panel.find('#search-input').focus();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user