<template>
    <v-row dense>
        <v-col
            cols="12" 
        >
            <cs-text-box 
                v-if="!! activeRecord"
                ref="FirstControl"
                :control="controls.name"
                :errors="errorsManager.ByField('name')"
                v-model="activeRecord.name"
                @focus="errorsManager.ResetField('name')"
                @blur="errorsManager.Validate('name')"
            />
        </v-col>
    </v-row>
</template>

<script>
    export default {
        props: {
            editable: {required: true},
        },

        computed: {
            form() {
                return this.editable.form;
            },
        },

        mounted() {
            setTimeout( () => {
                this.$refs.FirstControl.Focus();
            }, 250)
        },

        components: {
            CsTextBox: require('@CsVueComp/controls/texts/CsTextBox').default, 
        },
        
        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'DtCursNameEdit',
    }
</script>