mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-17 13:38:07 +01:00
@@ -0,0 +1,16 @@
|
||||
<script setup>
|
||||
const people = ['Wade Cooper', 'Arlene Mccoy', 'Devon Webb', 'Tom Cook', 'Tanya Fox', 'Hellen Schmidt', 'Caroline Schultz', 'Mason Heaney', 'Claudie Smitham', 'Emil Schaefer']
|
||||
|
||||
const selected = ref()
|
||||
const query = ref('Wade')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<USelectMenu
|
||||
v-model="selected"
|
||||
v-model:query="query"
|
||||
:options="people"
|
||||
placeholder="Select a person"
|
||||
searchable
|
||||
/>
|
||||
</template>
|
||||
@@ -146,6 +146,18 @@ componentProps:
|
||||
---
|
||||
::
|
||||
|
||||
### Control the query :u-badge{label="New" class="align-middle ml-2 !rounded-full" variant="subtle"}
|
||||
|
||||
Use a `v-model:query` to control the search query.
|
||||
|
||||
::component-example
|
||||
---
|
||||
component: 'select-menu-example-search-query'
|
||||
componentProps:
|
||||
class: 'w-full lg:w-48'
|
||||
---
|
||||
::
|
||||
|
||||
## Creatable
|
||||
|
||||
Use the `creatable` prop to enable the creation of new options when the search doesn't return any results (only works with `searchable`).
|
||||
|
||||
Reference in New Issue
Block a user