2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

[PUI] Fix choice-based settings showing as string fields (#7543)

This commit is contained in:
Lavissa
2024-07-02 02:25:22 +02:00
committed by GitHub
parent ee97f0859d
commit da9ab4a64f

View File

@ -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';