mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
Explicitly invoke setting.options when it's a function (#616)
This commit is contained in:
@@ -68,7 +68,10 @@ function getSettingAttrs(setting: SettingParams) {
|
||||
}
|
||||
switch (setting.type) {
|
||||
case 'combo':
|
||||
attrs['options'] = setting.options
|
||||
attrs['options'] =
|
||||
typeof setting.options === 'function'
|
||||
? setting.options(settingStore.get(setting.id))
|
||||
: setting.options
|
||||
if (typeof setting.options[0] !== 'string') {
|
||||
attrs['optionLabel'] = 'text'
|
||||
attrs['optionValue'] = 'value'
|
||||
|
||||
Reference in New Issue
Block a user