+ ${group.options.map((opt) => {
+ const rowIndex = flat++
+ const selected = rowIndex === this._selectedIndex
+ return html`
+
{
+ this._selectedIndex = rowIndex
+ }}
+ @mousedown=${(e: MouseEvent) => {
+ e.preventDefault() // keep CE focus & selection
+ const idx = Number(
+ (e.currentTarget as HTMLElement).dataset
+ .flatIndex,
+ )
+ const row = this._flatOptions[idx]
+ if (row) this.selectMention(row.option)
+ }}
+ >
+ ${opt.type === 'tab' && opt.image
+ ? html`
+

+ `
+ : ''}
+ ${opt.type === 'user' ? '@' : ''}${ellipsis(
+ opt.value,
+ 70,
+ )}
+
+ `
+ })}
+