Closed
Description
Hello,
I just set up the same system as this demo: https://ux.symfony.com/demos/live-component/product-form
This works very well for updating a classic select (EntityType) but not for a symfony UX autocomplete select type: https://ux.symfony.com/autocomplete
In the live component doc, it is stipulated to put the object id: https://symfony.com/bundles/ux-live-component/current/index.html#dynamically-updating-the-form-in-a-liveaction
live component form and listener:
#[AsLiveComponent]
class QuotationForm extends AbstractController
{
use DefaultActionTrait;
use LiveCollectionTrait;
#[LiveProp(writable: true, fieldName: 'formData')]
public Quotation $quotation;
protected function instantiateForm(): FormInterface
{
return $this->createForm(QuotationType::class, $this->quotation);
}
#[LiveListener('customer:created')]
public function onCustomerCreated(#[LiveArg] Customer $customer): void
{
$this->formValues['customer'] = $customer->getId();
}
//...
it updates the select which is hidden but not on the autocomplete overlay.
How can I refresh this from the listener?
Did I miss something?
Thank !
Metadata
Metadata
Assignees
Labels
No labels