mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed some issues when navigating back in history with Turbo.
This commit is contained in:
parent
e26f6e5394
commit
ab179a8b71
2 changed files with 8 additions and 3 deletions
|
@ -27,7 +27,8 @@ class TristateHelper {
|
|||
|
||||
registerTriStateCheckboxes() {
|
||||
//Initialize tristate checkboxes and if needed the multicheckbox functionality
|
||||
document.addEventListener("turbo:load", () => {
|
||||
|
||||
const listener = () => {
|
||||
$(".tristate").tristate( {
|
||||
checked: "true",
|
||||
unchecked: "false",
|
||||
|
@ -44,7 +45,10 @@ class TristateHelper {
|
|||
//@ts-ignore
|
||||
$('.tristate:checkbox', $row).tristate('state', new_state);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener("turbo:load", listener);
|
||||
document.addEventListener("turbo:render", listener);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue