feat: add missing clickaway directives (#9451)

* feat: add onClickaway to widget

* feat: add clickaway to portal

* feat: add directive to PublicArticleSearch
This commit is contained in:
Shivam Mishra
2024-05-10 11:15:36 +05:30
committed by GitHub
parent 4284c123a6
commit a4001374a5
3 changed files with 9 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import Vue from 'vue';
import PublicArticleSearch from './components/PublicArticleSearch.vue';
import TableOfContents from './components/TableOfContents.vue';
import { initializeTheme } from './portalThemeHelper.js';
import { directive as onClickaway } from 'vue-clickaway';
export const getHeadingsfromTheArticle = () => {
const rows = [];
@@ -80,6 +81,9 @@ export const InitializationHelpers = {
if (isSearchContainerAvailable) {
new Vue({
components: { PublicArticleSearch },
directives: {
'on-clickaway': onClickaway,
},
template: '<PublicArticleSearch />',
}).$mount('#search-wrap');
}