mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[PUI] Fix choice-based settings showing as string fields (#7543)
This commit is contained in:
parent
ee97f0859d
commit
da9ab4a64f
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user