diff --git a/graylog2-web-interface/src/views/components/contexts/WidgetFocusProvider.tsx b/graylog2-web-interface/src/views/components/contexts/WidgetFocusProvider.tsx index 1475fe92045f..91f0cc0f86d3 100644 --- a/graylog2-web-interface/src/views/components/contexts/WidgetFocusProvider.tsx +++ b/graylog2-web-interface/src/views/components/contexts/WidgetFocusProvider.tsx @@ -160,7 +160,9 @@ const WidgetFocusProvider = ({ children }: { children: React.ReactNode }): React query, ); - history.replace(newURI); + if (newURI !== query) { + history.replace(newURI); + } }, [history, query]); const setWidgetFocusing = useCallback((widgetId: string) => updateFocusQueryParams({ diff --git a/graylog2-web-interface/src/views/logic/valueactions/ShowDocumentsHandler.ts b/graylog2-web-interface/src/views/logic/valueactions/ShowDocumentsHandler.ts index 6a7f712f1551..2a26f5a719ed 100644 --- a/graylog2-web-interface/src/views/logic/valueactions/ShowDocumentsHandler.ts +++ b/graylog2-web-interface/src/views/logic/valueactions/ShowDocumentsHandler.ts @@ -62,7 +62,6 @@ const ShowDocumentsHandler = ({ .query(createElasticsearchQueryString(query)) .newId() .config(MessagesWidgetConfig.builder() - // @ts-ignore .fields([...messageListFields]) .showMessageRow(true).build()) .build(); diff --git a/graylog2-web-interface/src/views/pages/BulkEventReplayPage.tsx b/graylog2-web-interface/src/views/pages/BulkEventReplayPage.tsx index 6dc73ce4133e..6a48dcd5a745 100644 --- a/graylog2-web-interface/src/views/pages/BulkEventReplayPage.tsx +++ b/graylog2-web-interface/src/views/pages/BulkEventReplayPage.tsx @@ -35,7 +35,7 @@ const useEventsById = (eventIds: Array) => useQuery(['events', eventIds] const BulkEventReplayPage = () => { const location = useLocation(); - const { eventIds: initialEventIds = [], returnUrl } = location.state; + const { eventIds: initialEventIds = [], returnUrl } = (location?.state ?? {}); const { data: events, isInitialLoading } = useEventsById(initialEventIds); const history = useHistory();