File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
src/Resources/app/administration/src/module/blog-module/page/werkl-blog-list Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export default {
2121 total : 0 ,
2222 isLoading : true ,
2323 currentLanguageId : Shopware . Context . api . languageId ,
24+ term : '' ,
2425 } ;
2526 } ,
2627
@@ -89,6 +90,11 @@ export default {
8990 }
9091 } ,
9192
93+ onSearch ( term ) {
94+ this . term = term ;
95+ this . getList ( ) ;
96+ } ,
97+
9298 getList ( ) {
9399 this . isLoading = true ;
94100 const criteria = new Criteria ( this . page , this . limit ) ;
@@ -101,6 +107,11 @@ export default {
101107 if ( this . categoryId ) {
102108 criteria . addFilter ( Criteria . equals ( 'blogCategories.id' , this . categoryId ) ) ;
103109 }
110+
111+ if ( this . term ) {
112+ criteria . setTerm ( this . term ) ;
113+ }
114+
104115 return this . blogEntryRepository . search ( criteria , Shopware . Context . api ) . then ( ( result ) => {
105116 this . total = result . total ;
106117 this . blogEntries = result ;
Original file line number Diff line number Diff line change 1818 <sw -language-switch @on-change =" changeLanguage" />
1919 </template >
2020
21+ {% block werkl_blog_list_search %}
22+ <template #search-bar >
23+ <sw -simple-search-field
24+ v-model:value =" term"
25+ variant =" inverted"
26+ size =" small"
27+ :placeholder =" $tc('werkl-blog.general.placeholderSearchBar')"
28+ @update:value =" onSearch"
29+ />
30+ </template >
31+ {% endblock %}
32+
2133 {% block werkl_blog_list_smart_bar_actions %}
2234 <template #smart-bar-actions >
2335 {% block werkl_blog_list_smart_bar_actions_add %}
You can’t perform that action at this time.
0 commit comments