-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
feat(VSelect): Add list-header slot #22414
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
base: master
Are you sure you want to change the base?
Conversation
|
|
|
Proper tab-focus navigation is challenging. I am trying to get slots working with interactive elements within. Playground<template>
<v-app theme="dark">
<v-container class="d-flex align-center ga-3" max-width="600">
<v-btn text="btn before" />
<v-select
v-model="selectedItems"
:items="items"
class="rounded-lg"
item-title="value"
hide-details
multiple
>
<template #list-header>
<div class="pa-2 border-b">
<v-text-field
density="compact"
prepend-inner-icon="mdi-magnify"
hide-details
/>
</div>
</template>
<template #list-footer>
<div class="d-flex align-center px-4 border-t">
<span>Show all items</span>
<v-spacer />
<v-switch color="purple" hide-details />
</div>
</template>
</v-select>
<v-btn text="btn after" />
</v-container>
</v-app>
</template>
<script setup>
import { computed, shallowRef } from 'vue'
const selectedItems = shallowRef([])
const footerText = computed(() => `${selectedItems.value.length} selected`)
const items = Array.from({ length: 15 }, (_, i) => ({ id: i, value: i * 10 }))
</script>Try getting focus within, by opening with |
Description
resolves #22400
Markup