You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database is up, the assets are presents in public/build and the cache is cleared, here's the component (not modified):
<?php/* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespaceApp\Twig\Components;
useApp\Entity\Post;
useApp\Repository\PostRepository;
useSymfony\UX\LiveComponent\Attribute\AsLiveComponent;
useSymfony\UX\LiveComponent\Attribute\LiveProp;
useSymfony\UX\LiveComponent\DefaultActionTrait;
/** * Live component to display instant search for Posts. * * See https://symfony.com/bundles/ux-live-component/current/index.html * * @author Romain Monteil <[email protected]> */
#[AsLiveComponent(name: 'blog_search')]
finalclass BlogSearchComponent
{
use DefaultActionTrait;
/** * Properties marked as LiveProp are stateful properties. * This means that each time the component is re-rendered, it will remember the original value of the property * and set it to the component object. * * By default, LiveProp are readonly. Making them writable allow users to change their value. * * See https://symfony.com/bundles/ux-live-component/current/index.html#liveprops-stateful-component-properties */
#[LiveProp(writable: true)]
publicstring$query = '';
publicfunction__construct(
privatereadonlyPostRepository$postRepository,
) {
}
/** * @return array<Post> */publicfunctiongetPosts(): array
{
return$this->postRepository->findBySearchQuery($this->query);
}
}
The project is fresh and just installed using symfony new --demo my_project.
Thanks again for the help and have a great day 🙂
PS: The issue seems related to 6.3 / 6.4 as I have the same project under 6.2 and it works perfectly.
The text was updated successfully, but these errors were encountered:
Hi 👋🏻
I recently faced an issue when it comes to use the search form plugged to a LiveComponent, it seems that the LiveProp is not initialized:
The database is up, the assets are presents in
public/build
and the cache is cleared, here's the component (not modified):The project is fresh and just installed using
symfony new --demo my_project
.Thanks again for the help and have a great day 🙂
PS: The issue seems related to
6.3
/6.4
as I have the same project under6.2
and it works perfectly.The text was updated successfully, but these errors were encountered: