diff --git a/resources/js/controllers/listener_controller.js b/resources/js/controllers/listener_controller.js index 7c7b0aaa5..32413a119 100644 --- a/resources/js/controllers/listener_controller.js +++ b/resources/js/controllers/listener_controller.js @@ -19,6 +19,15 @@ export default class extends ApplicationController { asyncLoadData() { const data = new FormData(this.element.closest('form')); + + let state = document.getElementById('screen-state').value; + + // Added state to send + if (state.length > 0) { + data.append('_state', state) + } + + this.loadStream(this.data.get('async-route'), data); }