forked from mirror/Part-DB.Part-DB-server
Use stimulus for global reloading
This commit is contained in:
parent
390deca544
commit
ea6357c259
4 changed files with 22 additions and 14 deletions
8
assets/controllers/turbo/global_reload_controller.js
Normal file
8
assets/controllers/turbo/global_reload_controller.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
//If we encounter an element with global reload controller, then reload the whole page
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue