diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_sidebar_entries.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_sidebar_entries.vue index 2964d70c18b01574e0fbb26eb43e5919ae4b2f7a..0a125a663cbfa47075de75e1c185565d91d39ad4 100644 --- a/app/assets/javascripts/pages/shared/wikis/components/wiki_sidebar_entries.vue +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_sidebar_entries.vue @@ -4,8 +4,6 @@ import axios from '~/lib/utils/axios_utils'; import { sidebarEntriesToTree } from '../utils'; import WikiSidebarEntry from './wiki_sidebar_entry.vue'; -const SIDEBAR_LIMIT = 15; - export default { components: { WikiSidebarEntry, @@ -26,18 +24,12 @@ export default { }; }, - computed: { - countExceedsSidebarLimit() { - return this.totalCount > this.$options.SIDEBAR_LIMIT && !this.searchTerm; - }, - }, - watch: { async searchTerm() { this.entries = sidebarEntriesToTree( - this.allEntries - .filter((entry) => entry.title.toLowerCase().includes(this.searchTerm.toLowerCase())) - .slice(0, SIDEBAR_LIMIT), + this.allEntries.filter((entry) => + entry.title.toLowerCase().includes(this.searchTerm.toLowerCase()), + ), ); }, }, @@ -49,11 +41,10 @@ export default { entries = entries.filter((entry) => entry.slug !== '_sidebar'); - this.entries = sidebarEntriesToTree(entries.slice(0, SIDEBAR_LIMIT)); + this.entries = sidebarEntriesToTree(entries); this.totalCount = entries.length; this.allEntries = entries; }, - SIDEBAR_LIMIT, };