diff --git a/src/ui/ActiveScripts/ServerAccordionContent.tsx b/src/ui/ActiveScripts/ServerAccordionContent.tsx
index 313ec3402..fc1508dcc 100644
--- a/src/ui/ActiveScripts/ServerAccordionContent.tsx
+++ b/src/ui/ActiveScripts/ServerAccordionContent.tsx
@@ -25,11 +25,6 @@ export function ServerAccordionContent(props: IProps): React.ReactElement {
return (
<>
-
- {props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((ws) => (
-
- ))}
-
+
+ {props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((ws) => (
+
+ ))}
+
>
);
}
diff --git a/src/ui/ActiveScripts/ServerAccordions.tsx b/src/ui/ActiveScripts/ServerAccordions.tsx
index 4d9e669c5..25f030c6d 100644
--- a/src/ui/ActiveScripts/ServerAccordions.tsx
+++ b/src/ui/ActiveScripts/ServerAccordions.tsx
@@ -67,7 +67,12 @@ export function ServerAccordions(props: IProps): React.ReactElement {
};
data = serverToScriptMap[server.hostname];
}
- if (data !== undefined) data.workerScripts.push(ws);
+ if (data !== undefined) {
+ // Add only scripts that correspond to the filter
+ if (ws.hostname.includes(filter) || ws.name.includes(filter)) {
+ data.workerScripts.push(ws);
+ }
+ }
}
// Match filter in the scriptname part of the key
@@ -92,15 +97,6 @@ export function ServerAccordions(props: IProps): React.ReactElement {
spellCheck: false,
}}
/>
-
- {filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((data) => {
- return (
- data && (
-
- )
- );
- })}
-
+
+ {filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((data) => {
+ return (
+ data && (
+
+ )
+ );
+ })}
+
>
);
}