<template>
    <c-card>
        <c-select v-model="selected"
                  option-label="name"
                  track-by="id"
                  :searchable="true"
                  :options="items"
                  :multiple="true"
                  @change="log"/>
    </c-card>
</template>

<script>
    import CCard from "../../components/Card";
    import CIcon from "../../components/Icon";
    import CSelect from "../../components/Select";

    export default {
        name: "view-home",
        components: {CSelect, CIcon, CCard},
        data() {
            return {
                showItems: false,
                selected: null,
                items: _.map(Array(10), (item, index) => ({id: index, name: `option ${index}`}))
            }
        },
        methods: {
            log(...args) {
                console.log(...args);
            }
        }
    }
</script>
