adata-ui 2.0.12 → 2.0.13

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.
@@ -77,9 +77,14 @@ const disabledStyles =
77
77
  'disabled:pointer-events-none disabled:opacity-40 disabled:bg-deepblue-50 disabled:text-deepblue-200 disabled:dark:text-gray-500'
78
78
 
79
79
  const componentOptions = computed(() =>
80
- props.options.filter((item: T) =>
81
- item[props.searchKey as keyof T].toLowerCase().includes(searchValue.value.toLowerCase())
82
- )
80
+ props.options.filter((item: T) => {
81
+ if (Array.isArray(props.searchKey) && props.searchKey.length === 2) {
82
+ return item[props.searchKey[0] as keyof T].toLowerCase().includes(searchValue.value.toLowerCase()) ||
83
+ item[props.searchKey[1] as keyof T].toLowerCase().includes(searchValue.value.toLowerCase())
84
+ } else {
85
+ return item[props.searchKey as keyof T].toLowerCase().includes(searchValue.value.toLowerCase())
86
+ }
87
+ })
83
88
  )
84
89
 
85
90
  onClickOutside(wrapper, () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.0.12",
4
+ "version": "2.0.13",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",