I'm currently trying to create a dropdown option (enum) within the plugin settings. But all I get is an empty select button:
Here's the code I've tried:
await SETTINGS.registerSetting('unpinBehavior', {
value: 'KEEP_SELECTED',
type: SettingItemType.String,
section: 'note.tabs.settings',
isEnum: true,
public: true,
label: 'Select unpin behavior',
options: () => {
// 1 how it is used in the app - doesn't work
return {
keep: 'KEEP_SELECTED',
last: 'SELECT_LAST_ACTIVE',
adjacent: 'SELECT_ADJACENT',
};
// 2: simple array - doesn't work
// return ['KEEP_SELECTED','SELECT_LAST_ACTIVE', 'SELECT_ADJACENT'];
// 3: simple string - doesn't work
// return 'KEEP_SELECTED';
}
});
I've copied the code from the App settings below:
newTodoFocus: {
value: 'title',
type: SettingItemType.String,
section: 'note',
isEnum: true,
public: true,
appTypes: ['desktop'],
label: () => _('When creating a new to-do:'),
options: () => {
return {
title: _('Focus title'),
body: _('Focus body'),
};
},
},
Does anyone has an idea what I'm doing wrong? Or is not yet supported correctly?
Thanks.