<script>
export default {
  name: "IntegerValue",
  props: {
    id: {
      type: String,
      default: '',
    },
    value: Object
  },
  methods: {
    focus() {
      this.$refs.input.focus();
    }
  },
  computed: {
    inputValue: {
      set(value) {
        this.value.Integer = parseInt(value);
      },
      get() {
        return this.value.Integer;
      }
    }
  }
};
</script>

<template>
  <input ref="input" type="number" :id="id" step="1" v-model="inputValue">
</template>
