@svadmin/ui 0.26.2 → 0.26.3
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/package.json
CHANGED
|
@@ -120,7 +120,18 @@
|
|
|
120
120
|
const activeFilters = $derived.by(() => {
|
|
121
121
|
const result: Filter[] = [...filters];
|
|
122
122
|
if (searchText.trim() && searchableFields.length > 0) {
|
|
123
|
-
|
|
123
|
+
if (searchableFields.length === 1) {
|
|
124
|
+
result.push({ field: searchableFields[0].key, operator: 'contains', value: searchText });
|
|
125
|
+
} else {
|
|
126
|
+
result.push({
|
|
127
|
+
operator: 'or',
|
|
128
|
+
value: searchableFields.map(f => ({
|
|
129
|
+
field: f.key,
|
|
130
|
+
operator: 'contains',
|
|
131
|
+
value: searchText
|
|
132
|
+
}))
|
|
133
|
+
} as any);
|
|
134
|
+
}
|
|
124
135
|
}
|
|
125
136
|
// Add popover filters
|
|
126
137
|
for (const [key, value] of Object.entries(filterValues)) {
|