Skip to content

Commit 470e881

Browse files
committed
fix search functionality on windows
1 parent 5f9c6aa commit 470e881

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gui/src/renderer/components/ParameterInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const ParameterInput = ({
240240
let lastIndex = 0;
241241

242242
// Create a regex pattern that matches any of the search terms
243-
const pattern = searchTerms.map(term => RegExp.escape(term)).join('|');
243+
const pattern = searchTerms.map(term => term.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|');
244244
const regex = new RegExp(`(${pattern})`, 'gi');
245245

246246
const matches = [...text.matchAll(regex)];

gui/src/renderer/pages/Method.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const Config = () => {
100100
fullWidth
101101
variant="outlined"
102102
size="small"
103-
placeholder="Search parameters by name or description..."
103+
placeholder="Search for parameters by name or description..."
104104
value={searchTerm}
105105
onChange={(e) => setSearchTerm(e.target.value)}
106106
InputProps={{

0 commit comments

Comments
 (0)