diff --git a/packages/tui/src/component/dialog-config.tsx b/packages/tui/src/component/dialog-config.tsx
index dbe653ac42..751485b1ae 100644
--- a/packages/tui/src/component/dialog-config.tsx
+++ b/packages/tui/src/component/dialog-config.tsx
@@ -269,8 +269,12 @@ export function DialogConfig() {
setting.path.join(".") === "theme.name"
? Object.keys(themeState.all()).sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
: setting.values
- const compact = (setting: Setting) => setting.path.join(".") === "theme.name" || !setting.values
- const display = (setting: Setting) => setting.format?.(value(setting)) ?? String(value(setting))
+ const display = (setting: Setting) => {
+ const current = value(setting)
+ if (setting.format) return setting.format(current)
+ const index = setting.values?.indexOf(current)
+ return index === undefined || index < 0 ? String(current) : (setting.labels?.[index] ?? String(current))
+ }
const rows = createMemo(() =>
settings.map((setting, index) => ({
setting,
@@ -368,43 +372,16 @@ export function DialogConfig() {
{row.setting.title}
-
-
- ‹
-
-
- {display(row.setting)}
-
-
- ›
-
-
- }
- >
-
-
- {(option, optionIndex) => {
- const active = () => value(row.setting) === option
- return (
-
- {row.setting.labels?.[optionIndex()] ?? String(option)}
-
- )
- }}
-
-
-
+
+ {row.index === selected() ? "‹ " : " "}
+
+ {display(row.setting)}
+
+ {row.index === selected() ? " ›" : " "}
+
>