Skip to content

Replace deprecated FormEvent with InputEvent#4395

Merged
nickrolfe merged 1 commit into
mainfrom
nickrolfe/form-event-deprecated
May 15, 2026
Merged

Replace deprecated FormEvent with InputEvent#4395
nickrolfe merged 1 commit into
mainfrom
nickrolfe/form-event-deprecated

Conversation

@nickrolfe
Copy link
Copy Markdown
Contributor

@nickrolfe nickrolfe commented May 15, 2026

FormEvent is deprecated:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ca06abb4cc3399ea070c122be329a22f1c3b6800/types/react/index.d.ts#L2078-L2082

For manual testing, I couldn't see how to trigger the SuggestBox in the extension UI, but it works just fine in the Storybook (and I temporarily added an alert(...) to confirm the handler was being called with the right input.)

I believe this will also fix the failures in #4383

@nickrolfe nickrolfe requested a review from cklin May 15, 2026 15:09
@nickrolfe nickrolfe requested a review from a team as a code owner May 15, 2026 15:09
Copilot AI review requested due to automatic review settings May 15, 2026 15:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SuggestBox webview component to avoid using React’s deprecated FormEvent type by switching the input handler to InputEvent, aligning with newer @types/react typings and helping keep the view codebase warning-free.

Changes:

  • Replace FormEvent<HTMLInputElement> with InputEvent<HTMLInputElement> for the onInput handler.
  • Update the corresponding React type-only import.
Show a summary per file
File Description
extensions/ql-vscode/src/view/common/SuggestBox/SuggestBox.tsx Switches SuggestBox’s input event typing away from deprecated FormEvent.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@nickrolfe nickrolfe merged commit d3920ea into main May 15, 2026
23 checks passed
@nickrolfe nickrolfe deleted the nickrolfe/form-event-deprecated branch May 15, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants