Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VAutocomplete): hide selection slot when focused #17294

Merged
merged 1 commit into from
May 8, 2023

Conversation

KaelWD
Copy link
Member

@KaelWD KaelWD commented May 4, 2023

Description

Fixes #17291

Markup:

<template>
  <v-app>
    <v-main>
      <v-autocomplete
        v-model="friend"
        :items="people"
        color="blue-grey-lighten-2"
        label="Select Without Multiple"
      >
        <template #selection="{ item }">
          <div>
            text:
            <span>{{ item.title }}</span>
          </div>
        </template>
      </v-autocomplete>
      <v-autocomplete
        v-model="friend"
        :items="people"
        color="blue-grey-lighten-2"
        label="Select Without Multiple"
        chips
      />
      <v-autocomplete
        v-model="friends"
        :items="people"
        color="blue-grey-lighten-2"
        label="Select With Multiple"
        :multiple="true"
      >
        <template #selection="{ item }">
          <div>
            text:
            <span>{{ item.title }}</span>
          </div>
        </template>
      </v-autocomplete>
    </v-main>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const friend = ref()
  const friends = ref()
  const people = ['A', 'B', 'C']
</script>

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke C: VAutocomplete VAutocomplete labels May 4, 2023
@KaelWD KaelWD added this to the v3.2.x milestone May 4, 2023
@KaelWD KaelWD self-assigned this May 4, 2023
@KaelWD KaelWD requested a review from johnleider May 5, 2023 11:59
@KaelWD
Copy link
Member Author

KaelWD commented May 8, 2023

This now behaves the same as combobox too.

@KaelWD KaelWD changed the title fix(VAutocomplete): treat selection slot the same as chips fix(VAutocomplete): hide selection slot when focused May 8, 2023
@KaelWD KaelWD merged commit 6885b43 into master May 8, 2023
24 of 25 checks passed
@KaelWD KaelWD deleted the fix/17291-autocomplete-selection-chips-search branch May 8, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VAutocomplete VAutocomplete T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.2.2] VAutocomplete has problem on rendering slot:selection when muliple property is falsy.
1 participant