mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Mark sidebar and navbar as permanent between Turbo history navigations.
This commit is contained in:
parent
5ec87f911b
commit
e26f6e5394
3 changed files with 22 additions and 2 deletions
|
@ -97,6 +97,21 @@ export default class extends Controller {
|
|||
$(tree).treeview('search', [data]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the tree is already initialized (meaning bootstrap treeview was called on the object)
|
||||
* @private
|
||||
*/
|
||||
_isInitialized() {
|
||||
const $tree = $(this.treeTarget).treeview(true);
|
||||
|
||||
//If the tree is not initialized yet, we just get an empty jquery object with the treeview functions missing
|
||||
if(typeof $tree.findNodes === 'undefined' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
_getData() {
|
||||
//Use lambda function to preserve this context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue