baseui 0.0.0-next-a3fb288 → 0.0.0-next-8b2a019
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.
|
@@ -37,7 +37,7 @@ const filterOptions = (options, filterValue, excludeOptions, newProps) => {
|
|
|
37
37
|
acc.add(option[props.valueKey]);
|
|
38
38
|
return acc;
|
|
39
39
|
}, new Set());
|
|
40
|
-
const re = new RegExp(`${props.matchPos === 'start' ? '
|
|
40
|
+
const re = new RegExp(`${props.matchPos === 'start' ? '^' : ''}${escapeRegExp(filterValue)}`, props.ignoreCase ? 'i' : ''); // $FlowFixMe
|
|
41
41
|
|
|
42
42
|
return options.filter(option => {
|
|
43
43
|
if (excludeValues.has(option[props.valueKey])) return false;
|
|
@@ -43,7 +43,7 @@ var filterOptions = function filterOptions(options, filterValue, excludeOptions,
|
|
|
43
43
|
acc.add(option[props.valueKey]);
|
|
44
44
|
return acc;
|
|
45
45
|
}, new Set());
|
|
46
|
-
var re = new RegExp("".concat(props.matchPos === 'start' ? '
|
|
46
|
+
var re = new RegExp("".concat(props.matchPos === 'start' ? '^' : '').concat(escapeRegExp(filterValue)), props.ignoreCase ? 'i' : ''); // $FlowFixMe
|
|
47
47
|
|
|
48
48
|
return options.filter(function (option) {
|
|
49
49
|
if (excludeValues.has(option[props.valueKey])) return false;
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ var filterOptions = function filterOptions(options, filterValue, excludeOptions,
|
|
|
50
50
|
acc.add(option[props.valueKey]);
|
|
51
51
|
return acc;
|
|
52
52
|
}, new Set());
|
|
53
|
-
var re = new RegExp("".concat(props.matchPos === 'start' ? '
|
|
53
|
+
var re = new RegExp("".concat(props.matchPos === 'start' ? '^' : '').concat(escapeRegExp(filterValue)), props.ignoreCase ? 'i' : ''); // $FlowFixMe
|
|
54
54
|
|
|
55
55
|
return options.filter(function (option) {
|
|
56
56
|
if (excludeValues.has(option[props.valueKey])) return false;
|
|
@@ -58,7 +58,7 @@ const filterOptions = (
|
|
|
58
58
|
}, new Set());
|
|
59
59
|
|
|
60
60
|
const re = new RegExp(
|
|
61
|
-
`${props.matchPos === 'start' ? '
|
|
61
|
+
`${props.matchPos === 'start' ? '^' : ''}${escapeRegExp(filterValue)}`,
|
|
62
62
|
props.ignoreCase ? 'i' : ''
|
|
63
63
|
);
|
|
64
64
|
|