Skip to content

Commit 5963a1f

Browse files
committedNov 6, 2024
case insensitive regex search
1 parent df04db2 commit 5963a1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/EndpointsView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function EndpointsView() {
2121
};
2222

2323
const filteredEndpoints = schema.endpoints.filter(endpoint => {
24-
return endpoint.name.match(search) != null;
24+
return endpoint.name.match(new RegExp(search, "i")) != null;
2525
});
2626

2727
const selectedEndpoint = (!endpoint) ? null : schema.endpoints.filter(e => e.name === endpoint)?.[0];

‎src/TypesView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function TypesView() {
2424

2525
const filteredTypes = schema.types.filter(type => {
2626
const bt = type as BaseType;
27-
return `${bt.name.namespace}::${bt.name.name}`.match(search) != null;
27+
return `${bt.name.namespace}::${bt.name.name}`.match(new RegExp(search, "i")) != null;
2828
});
2929

3030
const selectedType = (!type) ? null : schema.types.filter(t => `${t.name.namespace}::${t.name.name}` === type)?.[0];

0 commit comments

Comments
 (0)