-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update va-select events #351
Changes from 4 commits
46f6915
590fc1f
d766867
ffa4581
eb2272a
7b55314
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,15 +48,14 @@ export class VaSelect { | |
*/ | ||
@Prop() enableAnalytics: boolean; | ||
|
||
/** | ||
* The event attached to select's onkeydown | ||
*/ | ||
@Event() vaKeyDown: EventEmitter; | ||
|
||
/** | ||
* The event emitted when the selected value changes | ||
*/ | ||
@Event() vaSelect: EventEmitter; | ||
@Event({ | ||
bubbles: true, | ||
composed: true, | ||
}) | ||
vaSelect: EventEmitter; | ||
Comment on lines
+54
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this is what should make that test easier for the app team, right? I was too focused on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tests are still failing locally when using |
||
|
||
/** | ||
* The event used to track usage of the component. This is emitted when an | ||
|
@@ -71,10 +70,6 @@ export class VaSelect { | |
|
||
@State() options: Array<Node>; | ||
|
||
private handleKeyDown() { | ||
this.vaKeyDown.emit(); | ||
} | ||
|
||
private handleChange(e: Event) { | ||
const target: HTMLSelectElement = e.target as HTMLSelectElement; | ||
this.value = target.value; | ||
|
@@ -134,7 +129,6 @@ export class VaSelect { | |
aria-describedby={errorSpanId} | ||
id="select" | ||
name={name} | ||
onKeyDown={() => this.handleKeyDown()} | ||
onChange={e => this.handleChange(e)} | ||
> | ||
{this.options} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also in favor of this native event + handler replacing the custom one 👍