use getElementByID

This commit is contained in:
Cory LaViska
2025-10-24 08:09:31 -04:00
parent 3612f72a3f
commit d2342a84e2

View File

@@ -690,8 +690,8 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
if (!this.withTooltip) return;
// Show only the active tooltip, hide the other
const tooltipMin = this.shadowRoot?.querySelector('#tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.querySelector('#tooltip-thumb-max') as WaTooltip;
const tooltipMin = this.shadowRoot?.getElementById('tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.getElementById('tooltip-thumb-max') as WaTooltip;
if (this.activeThumb === 'min') {
if (tooltipMin) tooltipMin.open = true;
@@ -705,8 +705,8 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
private hideRangeTooltips() {
if (!this.withTooltip) return;
const tooltipMin = this.shadowRoot?.querySelector('#tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.querySelector('#tooltip-thumb-max') as WaTooltip;
const tooltipMin = this.shadowRoot?.getElementById('tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.getElementById('tooltip-thumb-max') as WaTooltip;
if (tooltipMin) tooltipMin.open = false;
if (tooltipMax) tooltipMax.open = false;