This commit is contained in:
redphx
2024-12-07 16:48:58 +07:00
parent 557a38214d
commit 4011eb402a
55 changed files with 181 additions and 139 deletions

View File

@@ -123,7 +123,7 @@ export class BxNumberStepper extends HTMLInputElement implements BxHtmlSettingEl
if (options.ticks || options.exactTicks) {
const markersId = `markers-${key}`;
const $markers = CE('datalist', {id: markersId});
const $markers = CE('datalist', { id: markersId });
$range.setAttribute('list', markersId);
if (options.exactTicks) {
@@ -140,7 +140,7 @@ export class BxNumberStepper extends HTMLInputElement implements BxHtmlSettingEl
}
} else {
for (let i = self.uiMin + options.ticks!; i < self.uiMax; i += options.ticks!) {
$markers.appendChild(CE<HTMLOptionElement>('option', {value: i}));
$markers.appendChild(CE<HTMLOptionElement>('option', { value: i }));
}
}
self.appendChild($markers);

View File

@@ -260,6 +260,9 @@ export class BxSelectElement extends HTMLSelectElement {
for (let i = 0; i < optionsList.length; i++) {
const $option = optionsList[i];
const $indicator = indicatorsList[i];
if (!$option || !$indicator) {
continue;
}
clearDataSet($indicator);
if ($option.selected) {
@@ -288,7 +291,7 @@ export class BxSelectElement extends HTMLSelectElement {
visibleIndex: currentIndex,
} = this;
const goNext = (e.target as any).closest('button') === $btnNext;
const goNext = (e.target as HTMLElement).closest('button') === $btnNext;
let newIndex = goNext ? currentIndex + 1 : currentIndex - 1;
if (newIndex > this.optionsList.length - 1) {