TagInputSuggest
Suggests the vault’s tags in an <input>, whether or not the typed text starts with #. A picked tag is put into the input without the #.
Import:
import { TagInputSuggest } from '@mnaoumov/obsidian-lib/setting-components/tag-list-component';Signature:
export class TagInputSuggest extends AbstractInputSuggest<TagSuggestion>Extends: AbstractInputSuggest<TagSuggestion>
Constructor
new TagInputSuggest(app: App, inputEl: HTMLInputElement)Creates a new tag suggest.
Properties
| Property | Type | Description |
|---|---|---|
| inputEl | HTMLInputElement | The input the suggest completes. |
Methods
| Method | Returns | Description |
|---|---|---|
| getSuggestions(query) | TagSuggestion[] | Gets the tags matching the typed text. |
| renderSuggestion(suggestion, el) | void | Renders a tag with its note count. |
| selectSuggestion(suggestion, $event) | void | Puts the tag into the input, dispatches an input event, then calls the onSelect callback. |
Links to this page: