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:
@@ -5,6 +5,7 @@ namespace App\Livewire\Layers;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\On;
|
||||
use App\Models\Project;
|
||||
use App\Models\Phase;
|
||||
use App\Models\Layer;
|
||||
@@ -251,6 +252,7 @@ class LayerManager extends Component
|
||||
|
||||
// ── Save drawn GeoJSON ────────────────────────────────────────────────────
|
||||
|
||||
#[On('save-manual-geojson')]
|
||||
public function saveManualGeojson($geojsonString)
|
||||
{
|
||||
if (!$this->selectedLayer) {
|
||||
|
||||
Reference in New Issue
Block a user