<template>
  <gz-data-table
    formKey="test-widgets"
    dataListKey="TestWidgetDataList"
    :dataFilterId="currentDataFilterId"
    :showSelect="true"
    :singleSelect="false"
    v-on:update:selected="handleSelected"
  >
  </gz-data-table>
</template>

<script>
import GzDataTable from "../components/gz-data-table.vue";

export default {
  components: {
    GzDataTable
  },
  beforeCreate() {
    window.$gz.eventBus.$emit("menu-change", {
      isMain: true,
      icon: "vial",
      title: window.$gz.locale.get("WidgetList")
      //,
      //helpUrl: "form-inv-parts"
    });
  },
  data() {
    return {
      currentDataFilterId: 0
    };
  },
  methods: {
    handleSelected(selectedItems) {
      console.log(selectedItems);
    }
  }
};
</script>
