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/VCombobox): consistent open/close transition #20768

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Dec 7, 2024

Description

At the moment only VSelect has nice expand transition. I wish to make it a default for all selection components.

Markup:

<template>
  <v-app theme="dark">
    <v-container max-width="600">
      <v-card>
        <v-container fluid>
          <v-select label="v-select" :items="shortList" />
          <v-combobox label="v-combobox" :items="shortList" />
          <v-autocomplete label="v-autocomplete" :items="shortList" />
        </v-container>
      </v-card>
    </v-container>
  </v-app>
</template>

<script setup>
  const shortList = [0, 1, 2, 3, 4, 5, 6]
</script>

@KaelWD
Copy link
Member

KaelWD commented Dec 8, 2024

  • You could just omit the override, that's already the default for VMenu.
  • This was here because combobox and autocomplete clear the filter when the menu closes which causes the full list to appear for a moment if there is a transition.

@J-Sek J-Sek force-pushed the fix/selection-menu-transition branch from 19933ff to f92aa98 Compare December 8, 2024 13:25
@J-Sek J-Sek marked this pull request as draft December 8, 2024 13:25
@J-Sek
Copy link
Contributor Author

J-Sek commented Dec 8, 2024

  • This was here because combobox and autocomplete clear the filter when the menu closes which causes the full list to appear for a moment if there is a transition.

I see.. maybe useDelay would help here.

Edit: Upon inspecting the cause of this glitch, isPristine was reset to true in the inconsistent manner and since it is usually called in onAfterLeave, it should be fine without a few early calls. Now a few of the browser tests are failing, but I cannot imagine anything is broken just because of transition change.

@J-Sek J-Sek force-pushed the fix/selection-menu-transition branch 3 times, most recently from 15ffb05 to 07f0ea2 Compare December 8, 2024 18:16
@J-Sek J-Sek force-pushed the fix/selection-menu-transition branch from 07f0ea2 to dd894b9 Compare December 8, 2024 20:08
@J-Sek J-Sek marked this pull request as ready for review December 8, 2024 20:13
@J-Sek J-Sek requested a review from KaelWD December 8, 2024 20:16
@KaelWD
Copy link
Member

KaelWD commented Dec 9, 2024

This has the opposite problem:

Kooha-2024-12-09-15-27-52.mp4

@J-Sek
Copy link
Contributor Author

J-Sek commented Dec 9, 2024

...the opposite problem:

Arguably it is still a progress, but let me take another look.

@J-Sek J-Sek marked this pull request as draft December 9, 2024 09:24
@J-Sek J-Sek self-assigned this Dec 9, 2024
@J-Sek J-Sek added C: VCombobox VCombobox C: VAutocomplete VAutocomplete labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VAutocomplete VAutocomplete C: VCombobox VCombobox
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants