@onsvisual/svelte-components 0.1.76 → 0.1.78
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.
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
* @type {function}
|
|
113
113
|
*/
|
|
114
114
|
export let itemFilter = (label, filterText, option) =>
|
|
115
|
-
label.match(new RegExp(`\\b${filterText}`, "i")) &&
|
|
115
|
+
label.match(new RegExp(`\\b${filterText.replace(/[^\w\s]/gi, "")}`, "i")) &&
|
|
116
116
|
!(multiple && value?.length >= maxSelected) &&
|
|
117
117
|
!(mode === "search" && filterText?.length < 3);
|
|
118
118
|
/**
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
>
|
|
176
176
|
<div slot="item" let:item>
|
|
177
177
|
{@html item[labelKey].replace(
|
|
178
|
-
new RegExp(`\\b${filterText}`, "i"),
|
|
178
|
+
new RegExp(`\\b${filterText.replace(/[^\w\s]/gi, "")}`, "i"),
|
|
179
179
|
(str) => `<b>${str}</b>`
|
|
180
180
|
)}
|
|
181
181
|
{#if groupKey && !clusterByGroup}<span class="item-group">{item[groupKey]}</span>{/if}
|