diff --git a/packages/ncids-js/src/components/usa-combo-box/__tests__/combo-box.events.test.ts b/packages/ncids-js/src/components/usa-combo-box/__tests__/combo-box.events.test.ts index d04f40fd8..437dfffc9 100644 --- a/packages/ncids-js/src/components/usa-combo-box/__tests__/combo-box.events.test.ts +++ b/packages/ncids-js/src/components/usa-combo-box/__tests__/combo-box.events.test.ts @@ -499,13 +499,13 @@ describe('Combo box - Events', () => { inputValue: 'a', }); - const previouslySelected1 = Object.assign({}, selected); + const previouslySelected1 = Object.assign({}, Array.from(selected)); await user.keyboard('[Enter]'); expect(selectedEvent).toHaveBeenCalledTimes(1); expect(selectedEvent.mock.calls[0][0].detail).toEqual({ comboBox: comboBoxEl, inputValue: 'Apple', - selected: selected, + selected: Array.from(selected), previouslySelected: previouslySelected1, }); expect(listboxCollapsedEvent).toHaveBeenCalledTimes(1); @@ -514,7 +514,7 @@ describe('Combo box - Events', () => { inputValue: 'Apple', }); - const previouslySelected2 = Object.assign({}, selected); + const previouslySelected2 = Object.assign({}, Array.from(selected)); await user.keyboard('[Escape]'); expect(unselectedEvent).toHaveBeenCalledTimes(1); expect(unselectedEvent.mock.calls[0][0].detail).toEqual({ @@ -534,7 +534,7 @@ describe('Combo box - Events', () => { expect(textClearedEvent.mock.calls[0][0].detail).toEqual({ comboBox: comboBoxEl, previousInputValue: 'aa', - selected: selected, + selected: Array.from(selected), }); }); diff --git a/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.selected.event-details.ts b/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.selected.event-details.ts index e4c129927..a7b2b92df 100644 --- a/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.selected.event-details.ts +++ b/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.selected.event-details.ts @@ -4,10 +4,10 @@ import { ComboBoxEventDetails } from './combo-box.event-details'; * Custom event details for the `combo-box:selected` event. */ export type ComboBoxSelectedEventDetails = ComboBoxEventDetails & { - /** An [HTML collection of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) via the combo box select element. */ - selected: HTMLCollectionOf; + /** An [Array of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) via the combo box select element. */ + selected: Array; /** The current value of the combo box input. */ inputValue: string; - /** An [HTML collection of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) before a change was made. */ - previouslySelected: HTMLCollectionOf; + /** An [Array of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) before a change was made. */ + previouslySelected: Array; }; diff --git a/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.unselected.event-details.ts b/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.unselected.event-details.ts index 3c46d80b7..86bba46bc 100644 --- a/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.unselected.event-details.ts +++ b/packages/ncids-js/src/components/usa-combo-box/event-details/combo-box.unselected.event-details.ts @@ -4,6 +4,6 @@ import { ComboBoxEventDetails } from './combo-box.event-details'; * Custom event details for the `combo-box:unselected` event. */ export type ComboBoxUnselectedEventDetails = ComboBoxEventDetails & { - /** An [HTML collection of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) before a change was made. */ - previouslySelected: HTMLCollectionOf; + /** An [Array of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) before a change was made. */ + previouslySelected: Array; }; diff --git a/packages/ncids-js/src/components/usa-combo-box/event-details/input.text-cleared.event-details.ts b/packages/ncids-js/src/components/usa-combo-box/event-details/input.text-cleared.event-details.ts index 0cce0e187..9c10b5f36 100644 --- a/packages/ncids-js/src/components/usa-combo-box/event-details/input.text-cleared.event-details.ts +++ b/packages/ncids-js/src/components/usa-combo-box/event-details/input.text-cleared.event-details.ts @@ -6,11 +6,11 @@ import { ComboBoxEventDetails } from './combo-box.event-details'; export type ComboBoxTextClearedEventDetails = ComboBoxEventDetails & { /** * An - * [HTML collection of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) + * [Array of selected options](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions) * via the combo box select element. May be empty if no value was selected * before the text was cleared. */ - selected: HTMLCollectionOf; + selected: Array; /** The previous value of the combo box input before the text was cleared. */ previousInputValue: string; }; diff --git a/packages/ncids-js/src/components/usa-combo-box/usa-combo-box.component.ts b/packages/ncids-js/src/components/usa-combo-box/usa-combo-box.component.ts index c7738b0a4..a60324273 100644 --- a/packages/ncids-js/src/components/usa-combo-box/usa-combo-box.component.ts +++ b/packages/ncids-js/src/components/usa-combo-box/usa-combo-box.component.ts @@ -309,23 +309,23 @@ export class USAComboBox { } /** - * An HTMLCollection representing the set of