var ResourceService = require("services/ResourceService");
var ItemListService = require("services/ItemListService");

Vue.component("item-list", {

    props: [
        "template"
    ],

    data: function()
    {
        return {
            itemList: {},
            isLoading: false
        };
    },

    created: function()
    {
        this.$options.template = this.template;
    },

    ready: function()
    {
        ResourceService.bind("itemList", this);
        ResourceService.bind("isLoading", this);

        ItemListService.setSearchParams(document.location.search);
    }
});

var ResourceService = require("services/ResourceService");
var ItemListService = require("services/ItemListService");

Vue.component("item-list", {

    props: [
        "template"
    ],

    data: function()
    {
        return {
            itemList: {},
            isLoading: false
        };
    },

    created: function()
    {
        this.$options.template = this.template;
    },

    ready: function()
    {
        ResourceService.bind("itemList", this);
        ResourceService.bind("isLoading", this);

        ItemListService.setSearchParams(document.location.search);
    },

    watch:
    {
        itemList: function()
        {
            if (!$.isEmptyObject(this.itemList))
            {
                document.getElementById("filterCollapse").classList.add("in");
            }
        }
    }
});

UPDATE filter overlay now stay open after click
UPDATE filter overlay now stay open after click
