Skip to content

FolderInputSuggest

Suggests the vault’s folders, the root included, in an <input>, matching the typed text against the folder path.

Import:

import { FolderInputSuggest } from '@mnaoumov/obsidian-lib/setting-components/folder-list-component';

Signature:

export class FolderInputSuggest extends AbstractInputSuggest<TFolder>

Extends: AbstractInputSuggest<TFolder>

Constructor

new FolderInputSuggest(app: App, inputEl: HTMLInputElement)

Creates a new folder suggest.

Properties

PropertyTypeDescription
inputElHTMLInputElementThe input the suggest completes.

Methods

MethodReturnsDescription
getSuggestions(query)TFolder[]Gets the folders matching the typed text.
renderSuggestion(folder, el)voidRenders a folder.
selectSuggestion(folder, $event)voidPuts the folder path into the input, dispatches an input event, then calls the onSelect callback.

Links to this page: