@@ -291,6 +321,7 @@ function NetworkPanel(props: Props) {
onChange={onFilterChange}
height={28}
width={230}
+ value={filter}
/>
@@ -348,11 +379,11 @@ function NetworkPanel(props: Props) {
rows={filteredList}
referenceLines={referenceLines}
renderPopup
- onRowClick={onRowClick}
+ onRowClick={showDetailsModal}
additionalHeight={additionalHeight}
onJump={(row: any) => {
setPauseSync(true);
- devTools.update(INDEX_KEY, filteredList.indexOf(row));
+ devTools.update(INDEX_KEY, { index: filteredList.indexOf(row) });
jump(row.time);
}}
sortBy={sortBy}
diff --git a/frontend/app/components/shared/FetchDetailsModal/FetchDetailsModal.tsx b/frontend/app/components/shared/FetchDetailsModal/FetchDetailsModal.tsx
index 1ab311bfa..bcee5f5b9 100644
--- a/frontend/app/components/shared/FetchDetailsModal/FetchDetailsModal.tsx
+++ b/frontend/app/components/shared/FetchDetailsModal/FetchDetailsModal.tsx
@@ -4,6 +4,7 @@ import { Button } from 'UI';
import FetchPluginMessage from './components/FetchPluginMessage';
import { TYPES } from 'Types/session/resource';
import FetchTabs from './components/FetchTabs/FetchTabs';
+import { useStore } from 'App/mstore';
interface Props {
resource: any;
@@ -16,6 +17,9 @@ function FetchDetailsModal(props: Props) {
const [first, setFirst] = useState(false);
const [last, setLast] = useState(false);
const isXHR = resource.type === TYPES.XHR || resource.type === TYPES.FETCH;
+ const {
+ sessionStore: { devTools },
+ } = useStore();
useEffect(() => {
const index = rows.indexOf(resource);
@@ -28,6 +32,7 @@ function FetchDetailsModal(props: Props) {
const index = rows.indexOf(resource);
if (index > 0) {
setResource(rows[index - 1]);
+ devTools.update('network', { index: index - 1 })
}
};
@@ -35,6 +40,7 @@ function FetchDetailsModal(props: Props) {
const index = rows.indexOf(resource);
if (index < rows.length - 1) {
setResource(rows[index + 1]);
+ devTools.update('network', { index: index + 1 })
}
};
diff --git a/frontend/app/mstore/sessionStore.ts b/frontend/app/mstore/sessionStore.ts
index ec72c19ba..b947bd01a 100644
--- a/frontend/app/mstore/sessionStore.ts
+++ b/frontend/app/mstore/sessionStore.ts
@@ -51,12 +51,13 @@ class UserFilter {
class DevTools {
networkIndex: 0;
+ network: any;
+
consoleIndex: 0;
eventsIndex: 0;
- networkActive: null;
- consoleActive: null;
- eventsActive: null;
+
constructor() {
+ this.network = { index: 0, search: '', activeTab: 'ALL', isError: false };
makeAutoObservable(this, {
update: action,
});
@@ -64,7 +65,7 @@ class DevTools {
update(key: string, value: any) {
// @ts-ignore
- this[key] = value;
+ this[key] = Object.assign(this[key], value);
}
}