Skip to content

Commit

Permalink
use the new LiveComponent bound via URL
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jan 4, 2024
1 parent 800f051 commit 12aaee0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 43 deletions.
18 changes: 0 additions & 18 deletions assets/controllers/search-controller.js

This file was deleted.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
"symfony/property-info": "7.0.*",
"symfony/runtime": "7.0.*",
"symfony/security-bundle": "7.0.*",
"symfony/serializer": "7.0.*",
"symfony/string": "7.0.*",
"symfony/twig-bundle": "7.0.*",
"symfony/ux-chartjs": "*",
"symfony/ux-live-component": "^2.13.3",
"symfony/ux-live-component": "^2.x-dev@dev",
"symfony/ux-turbo": "^2.13.2",
"symfony/ux-twig-component": "^2.13.3",
"symfony/ux-twig-component": "^2.x-dev@dev",
"symfony/validator": "7.0.*",
"symfony/web-link": "7.0.*",
"symfony/yaml": "7.0.*",
Expand Down
47 changes: 26 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Twig/Components/SearchComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class SearchComponent
{
use DefaultActionTrait;

#[LiveProp(writable: true)]
#[LiveProp(writable: true, url: true)]
public string $query;

public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion templates/components/search.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div {{ attributes.defaults(stimulus_controller('search')) }}>
<div {{ attributes }}>
<form class="mb-3">
<label for="query" class="form-label d-none">Search</label>
<div class="input-group">
Expand Down

0 comments on commit 12aaee0

Please sign in to comment.