Skip to content

Commit 6af7898

Browse files
committed
fix: in react ui, regression where switching inputs does not re-render ui
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 13c77e0 commit 6af7898

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pdl-live-react/src/page/Page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export default function PDLPage(props: Props) {
3636
useEffect(() => setDarkModeForSession(getDarkModeUserSetting()), [])
3737

3838
const [value, setValue] = useState(initialValue)
39+
useEffect(() => {
40+
setValue(props.initialValue)
41+
}, [props.initialValue])
3942

4043
/** Manage the drawer that slides in from the right */
4144
const [searchParams] = useSearchParams()

0 commit comments

Comments
 (0)