Skip to content

Commit 91b1715

Browse files
committed
force rerender of settings when ui opens
1 parent 3c83d06 commit 91b1715

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ui/dialogs/settings.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,10 @@ const SettingInput = ({ namespace, name, template }) => {
354354
return null
355355
}
356356
}
357+
let forceUpdateSettingsUi = () => {}
357358
const Settings = () => {
359+
const [, forceRerender] = useState(0)
360+
forceUpdateSettingsUi = () => forceRerender(Math.random())
358361
const ref = useRef()
359362
useEffect(() => {
360363
if (ref.current) {
@@ -522,6 +525,7 @@ export function show_settings() {
522525
console.log('show settings')
523526
el.hidden = false
524527
visible = true
528+
forceUpdateSettingsUi()
525529
Array.from(el.children).forEach((child) => {
526530
child.style.display = 'unset'
527531
})

0 commit comments

Comments
 (0)