refactor(react/settings): use better option mechanism

This commit is contained in:
Elian Doran
2025-08-14 23:54:32 +03:00
parent cce3d3bce8
commit da92255dd6
5 changed files with 15 additions and 19 deletions

View File

@@ -65,7 +65,7 @@ function FormSelectGroup<T>({ values, keyProperty, titleProperty, currentValue }
return (
<option
value={item[keyProperty] as any}
selected={item[keyProperty] == currentValue} // triple equal is intentionally not used here, for comparisons with numeric values
selected={item[keyProperty] === currentValue}
>
{item[titleProperty ?? keyProperty] ?? item[keyProperty] as any}
</option>