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:
@@ -4,6 +4,7 @@ namespace App\Livewire\Projects;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\On;
|
||||
use App\Models\Project;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
@@ -49,6 +50,8 @@ class ProjectForm extends Component
|
||||
}
|
||||
|
||||
// Called from JS after map click / marker drag + reverse geocode
|
||||
|
||||
#[On('set-location')]
|
||||
public function setLocation(string $lat, string $lng, string $address = '', string $country = ''): void
|
||||
{
|
||||
$this->lat = $lat;
|
||||
|
||||
Reference in New Issue
Block a user