CommandPalettePromptItem
Table of contents
A command palette item that asks for text (e.g. a name) in the palette before running, with rows that say what Enter does and a Cancel row. Renders nothing outside the palette.
Properties
id
Keys the item in recents. Only the first palette item with a given id is listed.
id: string;initialValue
optional
Prefills the input, selected so typing replaces it.
initialValue?: string;label
The label to display on the item. If it's a string, it will be translated. If it's an object, the keys will be used as the language keys and the values will be translated.
label:
| {
[key: string]: TranslationKey;
}
| TranslationKey;onSubmit
Gets the trimmed text, which may be empty.
Parameters
| Name | Description |
|---|---|
| |
Returns
void;placeholder
The input's placeholder while prompting. Translated like label.
placeholder:
| {
[key: string]: TranslationKey;
}
| TranslationKey;readonlyOk
optional
If the editor is in readonly mode and the item is not marked as readonlyok, it will not be rendered.
readonlyOk?: boolean;Prev
CommandPalettePreferencesGroupNext
CommandPaletteSelectionGroup