Skip to content

Commit

Permalink
radio setFocus method has correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi committed Oct 12, 2023
1 parent 90b64c2 commit 3a084ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,7 @@ export namespace Components {
*/
"name": string;
"setButtonTabindex": (value: number) => Promise<void>;
"setFocus": (ev: any) => Promise<void>;
"setFocus": (ev: globalThis.Event) => Promise<void>;
/**
* the value of the radio.
*/
Expand Down
3 changes: 1 addition & 2 deletions core/src/components/radio/radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ export class Radio implements ComponentInterface {

/** @internal */
@Method()
async setFocus(ev: any) {
// TODO(FW-2832): type (using Event triggers a build error due to conflict with Stencil Event import)
async setFocus(ev: globalThis.Event) {
ev.stopPropagation();
ev.preventDefault();

Expand Down

0 comments on commit 3a084ca

Please sign in to comment.