Welcome to mirror list, hosted at ThFree Co, Russian Federation.

text_field.vue « variables « components « monitoring « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a0418806e5f10c338eaab2f9364015407c7e6c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<script>
import { GlFormGroup, GlFormInput } from '@gitlab/ui';

export default {
  components: {
    GlFormGroup,
    GlFormInput,
  },
  props: {
    name: {
      type: String,
      required: true,
    },
    label: {
      type: String,
      required: true,
    },
    value: {
      type: String,
      required: true,
    },
  },
  methods: {
    onUpdate(event) {
      this.$emit('input', event.target.value);
    },
  },
};
</script>
<template>
  <gl-form-group :label="label">
    <gl-form-input
      :value="value"
      :name="name"
      @keyup.native.enter="onUpdate"
      @blur.native="onUpdate"
    />
  </gl-form-group>
</template>