Skip to content

Commit

Permalink
Explicitly invoke setting.options when it's a function (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne authored Aug 24, 2024
1 parent 845ab88 commit f4242f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/dialog/content/setting/SettingGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit f4242f8

Please sign in to comment.