From bb846068f3db9b13b52066667b1466a0f28d8dc6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Sat, 26 Mar 2022 14:33:16 +0300 Subject: [PATCH] feat: `shallow: true` on router.replace --- src/web/search/CommonDisplay.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/web/search/CommonDisplay.tsx b/src/web/search/CommonDisplay.tsx index a7c7f4e..1b47dbe 100644 --- a/src/web/search/CommonDisplay.tsx +++ b/src/web/search/CommonDisplay.tsx @@ -164,10 +164,14 @@ const CommonDisplay: React.FC = ({ if (numDisplay !== defaultNumDisplay) query["numDisplay"] = numDisplay; - router.replace({ - pathname: router.pathname, - query, - }); + router.replace( + { + pathname: router.pathname, + query, + }, + undefined, + { shallow: true } + ); }; useNoInitialEffect(updateRoute, [numDisplay]);