Skip to content

Commit

Permalink
Fixed the missing state passing in the listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Aug 29, 2024
1 parent cc8ec4c commit 8e3599f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/js/controllers/listener_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8e3599f

Please sign in to comment.