Skip to content

Commit

Permalink
hide suggestions box when none available
Browse files Browse the repository at this point in the history
  • Loading branch information
hinanaya committed Jun 17, 2024
1 parent d7fc9f2 commit 375b111
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/fields/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class OBFieldTags extends OBField {
<span id="current">${this.#currentTag}</span>
</div>
</div>
${this.#suggestions.filter((tag) => ! this.#tags.includes(tag)).length > 0 && html`
<div id="suggestions" tabindex="0">
${this.#suggestions.filter((tag) => ! this.#tags.includes(tag)).map((tag) => html`
<span class="suggestion" onclick=${(e) => this.tagsAdd(tag)}>${tag}</span>
`)}
</div>
`}
`, this.root);
}

Expand Down

0 comments on commit 375b111

Please sign in to comment.