Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit b5a005e

Browse files
committed
Fix TGUI choice dialog not respecting the default option
1 parent cb0d784 commit b5a005e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tgui/packages/tgui/interfaces/ListInput.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const ListInput = (props, context) => {
2020
title,
2121
message = '',
2222
buttons = [],
23+
init_value,
2324
large_buttons,
2425
timeout,
2526
} = data;
@@ -40,7 +41,7 @@ export const ListInput = (props, context) => {
4041

4142
// Selected Button
4243
const [selectedButton, setSelectedButton] = useLocalState(
43-
context, 'selected_button', buttons[0]);
44+
context, 'selected_button', init_value);
4445
// Dynamically changes the window height based on the message.
4546
const windowHeight =
4647
325 + Math.ceil(message.length / 3) + (large_buttons ? 5 : 0);

0 commit comments

Comments
 (0)