Skip to content

Conversation

@yashas-hm
Copy link
Contributor

Summary

This PR addresses an issue where a _formFieldKey was being initialized too late, resulting in errors when attempting to interact with the form. The delayed initialization caused unexpected behavior.

Changes

  • Initialized the _formFieldKey earlier in the widget initState.

Testing

  • Verified that the form initializes correctly without errors.
  • Tested form validation and submission to ensure expected behavior.
  • Ran unit tests to confirm no regressions were introduced.

Issue

Fixes: #4

Copy link

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

This PR fixes a timing issue with _formFieldKey initialization in the ChipsInputAutocomplete widget. The key was previously being initialized after the controller was configured, which caused errors when attempting to interact with the form.

Key changes:

  • Moved _formFieldKey initialization to occur immediately after super.initState() and before controller setup
  • Moved the assignment of _formFieldKey to the controller to occur right after controller initialization

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

@EmilyMoonstone EmilyMoonstone merged commit 142fdc9 into BruckCode:main Oct 26, 2025
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.

Setting 'initialChips' causes error

2 participants