Skip to content

Commit

Permalink
do not render the dropdown header template, if there's nothing in it
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Apr 10, 2022
1 parent 45b902c commit d4bfee4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ export default {
role="option">${item.value}</div>`
},

/**
* Example: <header data-selector='tagify-suggestions-header' class="${this.settings.classNames.dropdownHeader}"></header>
* @param {Array} suggestions An array of all the matched sugegsted items, including those which were sliced away due to the "dropdown.maxItems" setting
*/
dropdownHeader(suggestions){
return `<header data-selector='tagify-suggestions-header' class="${this.settings.classNames.dropdownHeader}"></header>`
return '';
},

dropdownFooter(suggestions){
Expand Down

0 comments on commit d4bfee4

Please sign in to comment.