Skip to content

Commit

Permalink
[PUI] Fix choice-based settings showing as string fields (#7543)
Browse files Browse the repository at this point in the history
  • Loading branch information
LavissaWoW authored Jul 2, 2024
1 parent ee97f08 commit da9ab4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/frontend/src/components/settings/SettingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export function SettingList({

// Determine the field type of the setting
const fieldType = useMemo(() => {
if (setting?.type != undefined) {
return setting.type;
if (setting?.choices?.length) {
return 'choice';
}

if (setting?.choices != undefined && setting.choices.length > 0) {
return 'choice';
if (setting?.type != undefined) {
return setting.type;
}

return 'string';
Expand Down

0 comments on commit da9ab4a

Please sign in to comment.