import Rails from "@rails/ujs";
initialize() { console.log('hello from city-selector controller') $("#state_id, #county_id").on('select2:select', function () { let event = new Event('change', { bubbles: true }) // fire a native event this.dispatchEvent(event); }); this.check_forms() }