summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/filtered_search.js
blob: 182a2cf3724d3ea443bcb3cb5edac68dee2cadbb (plain)
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
import Vue from 'vue';
import store from '~/boards/stores';
import { queryToObject } from '~/lib/utils/url_utility';
import FilteredSearch from './components/filtered_search.vue';

export default () => {
  const queryParams = queryToObject(window.location.search);
  const el = document.getElementById('js-board-filtered-search');

  /*
    When https://github.com/vuejs/vue-apollo/pull/1153 is merged and deployed
    we can remove apolloProvider option from here. Currently without it its causing
    an error
  */

  return new Vue({
    el,
    store,
    apolloProvider: {},
    render: (createElement) =>
      createElement(FilteredSearch, {
        props: { search: queryParams.search },
      }),
  });
};