diff --git a/content-webapp/src/main/webapp/vue-app/news/components/NewsApp.vue b/content-webapp/src/main/webapp/vue-app/news/components/NewsApp.vue index 4f2d57be3..545505d4f 100644 --- a/content-webapp/src/main/webapp/vue-app/news/components/NewsApp.vue +++ b/content-webapp/src/main/webapp/vue-app/news/components/NewsApp.vue @@ -29,13 +29,14 @@
-
+
@@ -139,7 +140,6 @@ export default { searchText: '', searchNews: '', searchDelay: 300, - searchInputDisplayed: false, newsFilter: '', spacesFilter: [], newsStatusLabel: this.$t('news.app.filter.all'), @@ -185,6 +185,9 @@ export default { confirmDeleteNewsDialogTitle() { return this.isDraftsFilter ? this.$t('news.title.confirmDeleteDraftNews') : this.$t('news.title.confirmDeleteNews'); }, + disableSearchText() { + return this.isDraftsFilter; + } }, watch: { searchText() { @@ -372,7 +375,7 @@ export default { }, fetchNews(append = true) { this.loadingNews = true; - const searchTerm = this.searchText.trim().toLowerCase(); + const searchTerm = !this.isDraftsFilter && this.searchText.trim().toLowerCase() || ''; const offset = append ? this.newsList.length : 0; return this.$newsServices.getNews(this.newsFilter, this.spacesFilter, searchTerm, offset, this.newsPerPage + 1, false).then(data => { if (data.news && data.news.length) {