Skip to content

Fix: update Ask AI example questions to use React state#23

Merged
SHIVAM-KUMAR-59 merged 1 commit into
SHIVAM-KUMAR-59:mainfrom
thejas-1999:main
Jul 10, 2026
Merged

Fix: update Ask AI example questions to use React state#23
SHIVAM-KUMAR-59 merged 1 commit into
SHIVAM-KUMAR-59:mainfrom
thejas-1999:main

Conversation

@thejas-1999

Copy link
Copy Markdown

Description

Replaced the DOM manipulation hack (document.getElementById) in the Ask AI component's example questions with controlled React state (setQuestion), as requested.

Fixes #3

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

Manually verified that clicking the example questions correctly updates the React state and populates the input field without relying on synthetic events.

  • Existing tests pass
  • New tests added
  • Manual testing

Screenshots (if applicable)

N/A

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review
  • I have added/updated documentation as needed
  • My changes generate no new warnings
  • Tests pass locally

@SHIVAM-KUMAR-59
SHIVAM-KUMAR-59 merged commit 4bbe45b into SHIVAM-KUMAR-59:main Jul 10, 2026
8 checks passed
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.

[Bug] Example questions in Ask AI do not update React state correctly

3 participants