We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8de71d0 commit 63f38e9Copy full SHA for 63f38e9
packages/cascader/src/main.vue
@@ -337,7 +337,9 @@ export default {
337
}
338
339
let filteredFlatOptions = flatOptions.filter(optionsStack => {
340
- return optionsStack.some(option => new RegExp(value, 'i').test(option[this.labelKey]));
+ const escapedValue = value.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
341
+ return optionsStack.some(option => new RegExp(escapedValue, 'i')
342
+ .test(option[this.labelKey]));
343
});
344
345
if (filteredFlatOptions.length > 0) {
0 commit comments