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
| Property | Type | Description |
|---|---|---|
| inputEl | HTMLInputElement | The input the suggest completes. |
Methods
| Method | Returns | Description |
|---|---|---|
| getSuggestions(query) | TFolder[] | Gets the folders matching the typed text. |
| renderSuggestion(folder, el) | void | Renders a folder. |
| selectSuggestion(folder, $event) | void | Puts the folder path into the input, dispatches an input event, then calls the onSelect callback. |
Links to this page: