diff --git a/docs/docs/Choices/MultiChoice.md b/docs/docs/Choices/MultiChoice.md index a039d3cb..af157427 100644 --- a/docs/docs/Choices/MultiChoice.md +++ b/docs/docs/Choices/MultiChoice.md @@ -12,4 +12,4 @@ Make sure the multi is unfolded (as it is in the screenshot). Click the drag han ## Placeholder text -You can optionally set a placeholder for each Multi choice. This text shows up in the choice picker search box when you open the multi, which is handy for complex menus or grouped workflows. Leave it empty to keep the default placeholder. +You can optionally set a placeholder for each Multi choice. This text shows up in the choice picker search box when you open the multi, which is handy for complex menus or grouped workflows. Leave it empty to use the multi name as the placeholder. diff --git a/src/gui/MultiChoiceSettingsModal.ts b/src/gui/MultiChoiceSettingsModal.ts index 165ac2dd..78c24eca 100644 --- a/src/gui/MultiChoiceSettingsModal.ts +++ b/src/gui/MultiChoiceSettingsModal.ts @@ -43,10 +43,10 @@ export class MultiChoiceSettingsModal extends Modal { new Setting(this.contentEl) .setName("Placeholder") .setDesc( - "Shown in the choice picker search box when this multi choice opens.", + "Shown in the choice picker search box when this multi choice opens. Leave blank to use the multi name.", ) .addText((text) => { - text.setPlaceholder("Select an option..."); + text.setPlaceholder("Defaults to the multi name"); text.setValue(this.placeholder).onChange((value) => { this.placeholder = value; }); diff --git a/src/gui/suggesters/choiceSuggester.ts b/src/gui/suggesters/choiceSuggester.ts index ae2e406d..2f50ec89 100644 --- a/src/gui/suggesters/choiceSuggester.ts +++ b/src/gui/suggesters/choiceSuggester.ts @@ -77,7 +77,7 @@ export default class ChoiceSuggester extends FuzzySuggestModal { const nextPlaceholder = isBack ? this.placeholderStack[this.placeholderStack.length - 1] - : multi.placeholder?.trim() || undefined; + : multi.placeholder?.trim() || multi.name; const nextStack = isBack ? this.placeholderStack.slice(0, -1) : [...this.placeholderStack, this.currentPlaceholder];