Fix Livewire BindingResolutionException: replace @this calls in pushed scripts with #[On] + Livewire.emit
- Add #[On] attributes to 5 Livewire component methods:
- LayerManager::saveManualGeojson
- ProjectForm::setLocation
- ProjectMap::selectFeature (already had #[On])
- TaskForm::closeModal
- TaskKanban::updateTaskStatus
- Replace @this.method() in @push('scripts') with Livewire.emit() calls
- Fix DataTable event payloads from objects {id: X} to scalars X for:
- FeatureTable::map-select-feature
- InspectionTable::map-view-inspection, edit-inspection, delete-inspection
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
country = (d.address && d.address.country_code) ? d.address.country_code : '';
|
||||
}
|
||||
} catch (e) { /* geocoding optional */ }
|
||||
@this.setLocation(String(lat), String(lng), address, country);
|
||||
Livewire.emit('set-location', String(lat), String(lng), address, country);
|
||||
setStatus('');
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
placeMarker(lat, lng);
|
||||
const address = arr[0].display_name || '';
|
||||
const country = (arr[0].address && arr[0].address.country_code) ? arr[0].address.country_code : '';
|
||||
@this.setLocation(String(lat), String(lng), address, country);
|
||||
Livewire.emit('set-location', String(lat), String(lng), address, country);
|
||||
setStatus('');
|
||||
} else {
|
||||
setStatus('{{ __('No results') }}');
|
||||
|
||||
Reference in New Issue
Block a user