From a3eb6fc61a0c3ce4b87e0143724878f328d18beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Fri, 11 Apr 2025 12:33:28 +0200 Subject: [PATCH] pl-fe: do not drop search params when opening modal but also don't break modals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/components/modal-root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pl-fe/src/components/modal-root.tsx b/packages/pl-fe/src/components/modal-root.tsx index c3217fc4c..ad8939a3c 100644 --- a/packages/pl-fe/src/components/modal-root.tsx +++ b/packages/pl-fe/src/components/modal-root.tsx @@ -141,7 +141,7 @@ const ModalRoot: React.FC = ({ children, onCancel, onClose, type }) const ensureHistoryBuffer = () => { const { state } = history.location; if (!state || (state as any).plFeModalKey !== modalHistoryKey.current) { - history.push(history.location, { ...(state as any), plFeModalKey: modalHistoryKey.current }); + history.push({ ...history.location, state: { ...(state as any), plFeModalKey: modalHistoryKey.current } }); } };