<commit_before><template>
  <div class="field">
    <label v-if="getLabel" class="label">{{ getLabel }}</label>
    <div :class="classList" @click="openOptions">
      <input
        type="text"
        ref="vueSelect"
        autocomplete="off"
        tabindex="0"
        :class="inputClassList"
        :placeholder="getPlaceholder"
        :value="isLoaded ? searchText : this.item.name"
        @input="onInput"
        @blur="onBlur"
        @keydown.up="onKeyUp"
        @keydown.down="onKeyDown"
        @keyup.enter="onKeyEnter"
        @keydown.delete="onKeyDelete"
      >
      <vue-icon v-if="icon" :icon="icon" :color="color" :size="size"/>
      <div class="select-box" v-if="opened">
        <div class="select-item" @click.stop="selectItem({id:0,name:''})" @mousedown="mousedownItem"></div>
        <div class="select-item" v-for="item in listWithFilter" :key="item.id" @click.stop="selectItem(item)" @mousedown="mousedownItem">{{ item.name }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import VueIcon from '@/elements/VueIcon'
export default {
  name: 'VueSelect',
  components: {
    'vue-icon': VueIcon
  },
  props: {
    selectedItem: {
      default () {
        return {
          id: 0,
          name: ''
        }
      }
    },
    icon: {
      type: [String, Boolean],
      default: false
    },
    iconPosition: {
      type: [String, Boolean],
      default: false
    },
    color: {
      type: [String, Boolean],
      default: false
    },
    size: {
      type: [String, Boolean],
      default: false
    },
    state: {
      type: [String, Boolean],
      default: false
    },
    label: {
      type: [String, Boolean],
      default: false
    },
    list: {
      required: true,
      default: [{
        id: 0,<commit_msg>fix icon position<commit_after><template>
  <div class="field">
    <label v-if="getLabel" class="label">{{ getLabel }}</label>
    <div :class="classList" @click="openOptions">
      <input
        type="text"
        ref="vueSelect"
        autocomplete="off"
        tabindex="0"
        :class="inputClassList"
        :placeholder="getPlaceholder"
        :value="isLoaded ? searchText : this.item.name"
        @input="onInput"
        @blur="onBlur"
        @keydown.up="onKeyUp"
        @keydown.down="onKeyDown"
        @keyup.enter="onKeyEnter"
        @keydown.delete="onKeyDelete"
      >
      <vue-icon v-if="icon" :icon="icon" :position="iconPosition" :color="color" :size="size"/>
      <div class="select-box" v-if="opened">
        <div class="select-item" @click.stop="selectItem({id:0,name:''})" @mousedown="mousedownItem"></div>
        <div class="select-item" v-for="item in listWithFilter" :key="item.id" @click.stop="selectItem(item)" @mousedown="mousedownItem">{{ item.name }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import VueIcon from '@/elements/VueIcon'
export default {
  name: 'VueSelect',
  components: {
    'vue-icon': VueIcon
  },
  props: {
    selectedItem: {
      default () {
        return {
          id: 0,
          name: ''
        }
      }
    },
    icon: {
      type: [String, Boolean],
      default: false
    },
    iconPosition: {
      type: String,
      default: 'left'
    },
    color: {
      type: [String, Boolean],
      default: false
    },
    size: {
      type: [String, Boolean],
      default: false
    },
    state: {
      type: [String, Boolean],
      default: false
    },
    label: {
      type: [String, Boolean],
      default: false
    },
    list: {
      required: true,
      default: [{
        id: 0,
{'fraction_non_alphanumeric': 0.16837157865634503, 'fraction_numerical': 0.002211777716339508, 'mean_word_length': 2.2274754683318467, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2236879', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1193, 'n_words': 229}