Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdouglaspratt committed Nov 16, 2024
1 parent 6d2c971 commit ee567b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions es-ds-components/components/es-segmented-control.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const labelId = computed(() => {
});
// return the left/width to use for the active state bubble, for each provided button
const getButtonDimensions = (buttons: NodeListOf<Element> | HTMLCollection) => {
const getButtonDimensions = (buttons: HTMLCollection) => {
const result = [];
let runningLeftTotal = 0;
for (let i = 0; i < buttons.length; i += 1) {
Expand All @@ -62,7 +62,9 @@ onMounted(() => {
if (segmentedControlRef.value) {
// set the initial button dimensions
const buttons = segmentedControlRef.value.querySelectorAll('.es-segmented-control-button');
const buttons = segmentedControlRef.value.querySelectorAll(
'.es-segmented-control-button',
) as unknown as HTMLCollection;
buttonDimensions.options = getButtonDimensions(buttons);
// set up a resize observer for whenever the segmented control's button group changes width
Expand Down

0 comments on commit ee567b1

Please sign in to comment.