forked from epicmaxco/vuestic-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[epicmaxco#2228] autocomplete functional for va-select
- Loading branch information
Showing
11 changed files
with
399 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/docs/src/page-configs/ui-elements/select/examples/Autocomplete.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||
<va-select | ||
v-model="singleSelect" | ||
class="col-span-1" | ||
label="Sigle select" | ||
placeholder="Start to write..." | ||
:options="options" | ||
autocomplete | ||
highlight-search | ||
/> | ||
|
||
<va-select | ||
v-model="multiSelect" | ||
class="col-span-1" | ||
label="Multiple select" | ||
placeholder="Start to write..." | ||
:options="options" | ||
multiple | ||
autocomplete | ||
highlight-search | ||
/> | ||
|
||
<va-select | ||
v-model="multiSelect" | ||
class="col-span-1" | ||
label="Multiple select with content slot" | ||
placeholder="Start to write..." | ||
:options="options" | ||
multiple | ||
autocomplete | ||
highlight-search | ||
> | ||
<template #content="{ value }"> | ||
<va-chip | ||
v-for="chip in value" | ||
:key="chip" | ||
class="mr-1" | ||
size="small" | ||
> | ||
{{ chip }} | ||
</va-chip> | ||
</template> | ||
</va-select> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue' | ||
const options = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] | ||
const singleSelect = ref('') | ||
const multiSelect = ref([]) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
v-model="value" | ||
multiple | ||
searchable | ||
highlight-search | ||
/> | ||
</div> | ||
</template> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.