forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3rdparty-using-controller.diff
28 lines (27 loc) · 1.32 KB
/
3rdparty-using-controller.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/templates/product/index.html.twig b/templates/product/index.html.twig
index c3cf015..cf3265a 100644
--- a/templates/product/index.html.twig
+++ b/templates/product/index.html.twig
@@ -38,7 +38,7 @@
<form>
<div
class="input-group"
- {{ stimulus_controller('search-preview', {
+ {{ stimulus_controller('autocomplete', {
url: path('app_homepage')
}) }}
>
@@ -48,12 +48,12 @@
placeholder="Search products..."
type="search"
class="form-control"
- data-action="search-preview#onSearchInput"
+ data-autocomplete-target="input"
>
<div
class="search-preview"
- data-search-preview-target="result"
+ data-autocomplete-target="results"
></div>
</div>
</form>