mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +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
|
// Determine the field type of the setting
|
||||||
const fieldType = useMemo(() => {
|
const fieldType = useMemo(() => {
|
||||||
if (setting?.type != undefined) {
|
if (setting?.choices?.length) {
|
||||||
return setting.type;
|
return 'choice';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setting?.choices != undefined && setting.choices.length > 0) {
|
if (setting?.type != undefined) {
|
||||||
return 'choice';
|
return setting.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'string';
|
return 'string';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user