1

enter image description here

I am using vuetify. I needed the "v-combobox" tag, but it has an arrow icon by default, I rummaged through the Vuetify documentation and it didn't help to understand how to remove it, what can I do without losing the application logic? Maby i can kill it at html lvl?

<template>
<v-app>
    <v-combobox
        v-model="chips"
        :items="items"
        chips
        clearable
        multiple
        solo>
        <template v-slot:selection="{ item }">
            <v-chip close @click:close="remove(item)">
                <strong>{{ item }}</strong
                >&nbsp;
            </v-chip>
        </template>
    </v-combobox>
</v-app>
</template>

<script>
export default {
    name: "Test",
    data: () => ({
        chips: ["hello", "stack", "overflow"],
    }),
    methods: {
        remove(item) {
            this.chips.splice(this.chips.indexOf(item), 1);
            this.chips = [...this.chips];
            },
        }
    };
</script>
hajime4life
  • 37
  • 1
  • 5

2 Answers2

1

Check this codesandbox I made: https://codesandbox.io/s/stack-71683514-hide-combobox-arrow-icon-yuto05?file=/src/components/Example.vue

Example

If you just want to hide the icon for an expecific combobox, you can do it with CSS, in this example I just created an special class named noicon-combo, and configured like this:

<v-col cols="12">
  <v-combobox
    v-model="select"
    class="noicon-combo"
    :items="items"
    label="Combobox No Icon"
    multiple
    outlined
    dense
  ></v-combobox>

  <v-combobox
    v-model="select"
    :items="items"
    label="Combobox"
    multiple
    outlined
    dense
  ></v-combobox>
</v-col>
/* Normal version */
.noicon-combo .v-select__slot .v-input__icon {
  display: none !important;
}
/* Scoped version */
.noicon-combo >>>.v-select__slot .v-input__icon {
  display: none !important;
}
cmfc31
  • 1,385
  • 2
  • 8
  • 9
0

Add this prop to the combobox :append-icon="null"
Have a read of docs here https://vuetifyjs.com/en/api/v-combobox/#links

      <v-combobox
        v-model="chips"
        :items="items"
        chips
        clearable
        multiple
        solo
        :append-icon="null">