v-nuxt-ui 0.2.22 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { isEmptyString } from "#v/utils";
|
|
2
3
|
import { computed, ref, useTemplateRef } from "vue";
|
|
3
4
|
const props = defineProps({
|
|
4
5
|
label: { type: String, required: false },
|
|
@@ -21,8 +22,9 @@ const getItemLabel = (item) => {
|
|
|
21
22
|
}
|
|
22
23
|
return String(item?.label ?? "");
|
|
23
24
|
};
|
|
25
|
+
const dropdownOpen = ref(false);
|
|
24
26
|
const filteredItems = computed(() => {
|
|
25
|
-
if (
|
|
27
|
+
if (isEmptyString(searchTerm.value) || !dropdownOpen.value) {
|
|
26
28
|
return props.items;
|
|
27
29
|
}
|
|
28
30
|
return props.items.filter((item) => getItemLabel(item).toLowerCase().includes(searchTerm.value.toLowerCase()));
|
|
@@ -44,11 +46,12 @@ defineExpose({
|
|
|
44
46
|
<template>
|
|
45
47
|
<UInputMenu
|
|
46
48
|
ref="inputMenu"
|
|
49
|
+
v-model:open="dropdownOpen"
|
|
47
50
|
v-model:search-term="searchTerm"
|
|
48
51
|
v-model="modelValue"
|
|
49
52
|
:items="filteredItems"
|
|
50
53
|
:placeholder="placeholder"
|
|
51
|
-
:multiple="multiple
|
|
54
|
+
:multiple="multiple"
|
|
52
55
|
:size="size"
|
|
53
56
|
color="neutral"
|
|
54
57
|
delete-icon="i-lucide-trash"
|
|
@@ -59,6 +62,7 @@ defineExpose({
|
|
|
59
62
|
:disabled="disabled"
|
|
60
63
|
open-on-focus
|
|
61
64
|
trailing
|
|
65
|
+
ignore-filter
|
|
62
66
|
:ui="ui"
|
|
63
67
|
:content="{
|
|
64
68
|
align: 'start'
|
|
@@ -77,7 +77,7 @@ defineExpose({ createRow, updateRow, deleteRow, refresh: fetchList, stats, data
|
|
|
77
77
|
<template>
|
|
78
78
|
<div class="flex-1 flex flex-col overflow-hidden">
|
|
79
79
|
<!-- header -->
|
|
80
|
-
<div class="h-(--ui-header-height) flex items-center pl-2.5 pr-2.5 border-b border-default">
|
|
80
|
+
<div class="h-(--ui-header-height) flex items-center pl-2.5 pr-2.5 border-b border-default z-1">
|
|
81
81
|
<div class="flex items-center gap-1">
|
|
82
82
|
<LayoutButtonCollapse />
|
|
83
83
|
<span class="font-bold">{{ cnName }}</span>
|
package/package.json
CHANGED