-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#1642) Update combo box text clear/unselected event
- Updates some lacking documentation as well Closes #1642
- Loading branch information
1 parent
cb4e386
commit 039e4d6
Showing
6 changed files
with
136 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...etails/combo-box.cleared.event-details.ts → ...ils/combo-box.unselected.event-details.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { ComboBoxEventDetails } from './combo-box.event-details'; | ||
|
||
/** | ||
* Custom event details for the `combo-box:cleared` event. | ||
* Custom event details for the `combo-box:unselected` event. | ||
*/ | ||
export type ComboBoxClearedEventDetails = ComboBoxEventDetails & { | ||
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<HTMLOptionElement>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...s/ncids-js/src/components/usa-combo-box/event-details/input.text-cleared.event-details.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ComboBoxEventDetails } from './combo-box.event-details'; | ||
|
||
/** | ||
* Custom event details for the `combo-box:input:text-cleared` event. | ||
*/ | ||
export type ComboBoxTextClearedEventDetails = ComboBoxEventDetails & { | ||
/** | ||
* An | ||
* [HTML collection 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<HTMLOptionElement>; | ||
/** The previous value of the combo box input before the text was cleared. */ | ||
previousInputValue: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters