import store from '@/Store' import { wireDirectives } from '../util' let cleanupStackByComponentId = {} export default function () { store.registerHook('element.initialized', (el, component) => { let directives = wireDirectives(el) if (directives.missing('submit')) return // Set a forms "disabled" state on inputs and buttons. // Livewire will clean it all up automatically when the form // submission returns and the new DOM lacks these additions. el.addEventListener('submit', () => { cleanupStackByComponentId[component.id] = [] component.walk(node => { if (! el.contains(node)) return if (node.hasAttribute('wire:ignore')) return false if ( //