Show a tooltip when disabling the lookup button on status page

And fix some auto-formatting
This commit is contained in:
Eli Ribble 2026-02-06 16:55:29 +00:00
parent 49b10a7d7e
commit d464a5fbd0
No known key found for this signature in database
3 changed files with 121 additions and 80 deletions

View file

@ -164,24 +164,23 @@ class AddressOrReportInput extends HTMLElement {
this.shadowRoot.querySelectorAll('.suggestion-item').forEach(el => {
el.addEventListener('click', e => {
const type = el.dataset.type;
let detail = null;
if (type == "report") {
const index = parseInt(el.dataset.index);
const report = this._reports[index];
this.value = _formatReportID(report.id);
detail = this._reports[index];
this.value = _formatReportID(detail.id);
this._suggestionsContainer.innerHTML = "";
} else if (type == "address") {
const index = parseInt(el.dataset.index);
const address = this._addresses[index];
this.SetValue(address);
detail = this._addresses[index];
this.SetValue(detail);
// Dispatch custom event
this.dispatchEvent(new CustomEvent('address-selected', {
bubbles: true,
composed: true, // Allows event to cross shadow DOM boundary
detail: {
location: address
}
}));
}
this.dispatchEvent(new CustomEvent('suggestion-selected', {
bubbles: true,
composed: true, // Allows event to cross shadow DOM boundary
detail: detail,
}));
});
});
}