namespace App\Http\Livewire;
...
use Livewire\Component;
class CompanyComparisonForm extends Component implements HasForms
{
use InteractsWithForms;
protected $form;
public $technologies;
public function formFieldUpdated($propertyName, $value)
{
// never gets here
Log::error('formFieldUpdated2');
}
public function render()
{
$this->form = $this->makeForm()
->schema([
Select::make('technologies')
->reactive()
//->callAfterStateUpdated()
->afterStateUpdated(function ($state) {
// never gets here either
Log::error('Updating...');
// tried these too
//$this->formFieldUpdated('technologies', $state);
//$this->dispatch('formFieldUpdated', $state);
})
// these don't make a difference
//->live()
//->native()
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
])
// this also doesn't change whether it's enabled or not
->live();
return view('livewire.company-comparison-form');
}
}`
namespace App\Http\Livewire;
...
use Livewire\Component;
class CompanyComparisonForm extends Component implements HasForms
{
use InteractsWithForms;
protected $form;
public $technologies;
public function formFieldUpdated($propertyName, $value)
{
// never gets here
Log::error('formFieldUpdated2');
}
public function render()
{
$this->form = $this->makeForm()
->schema([
Select::make('technologies')
->reactive()
//->callAfterStateUpdated()
->afterStateUpdated(function ($state) {
// never gets here either
Log::error('Updating...');
// tried these too
//$this->formFieldUpdated('technologies', $state);
//$this->dispatch('formFieldUpdated', $state);
})
// these don't make a difference
//->live()
//->native()
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
])
// this also doesn't change whether it's enabled or not
->live();
return view('livewire.company-comparison-form');
}
}`