<template>
    <v-sheet
        tile
        color="transparent"
        :max-width="maxWidth"
    >
        <v-text-field
            dense
            hide-details
            clearable
            :placeholder="__('Căutare rapidă...')"
            append-icon="mdi-magnify"
            :disabled="disabled"
            class="text-body-2"

            v-model="searched"
        >
        </v-text-field>
    </v-sheet>
</template>

<script>
    export default {

        props: {
            dataprovider: {required: true},
            maxWidth: {default: 192},
            disabled: {default: false},
        },

        computed: {
            searched: {
                get: function() {
                    return this.dataprovider.searchedValue;
                },

                set: function(searched) {
                    this.dataprovider.QuickSearch(searched)
                }
            },
        },

        name: 'CsQuickSearch',
    }
</script>