Skip to content
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

FEATURE: Make formState initialization extendable #154

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

daniellienert
Copy link
Member

This adds a mechanism to hook into the form state initialization and define custom initializers.

Resolves: #152

This adds a mechanism to hook into the form state initialization and define custom initializers.

Resolves: #152
@daniellienert daniellienert force-pushed the feature/simple-form-initializer branch from 024862b to 70326e6 Compare May 3, 2022 14:53
@daniellienert daniellienert force-pushed the feature/simple-form-initializer branch 2 times, most recently from f2e3c72 to b605f19 Compare May 3, 2022 15:53
@daniellienert daniellienert force-pushed the feature/simple-form-initializer branch from b605f19 to a659196 Compare May 3, 2022 16:17
@daniellienert daniellienert requested a review from mficzel May 3, 2022 16:29
Copy link
Member

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

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

Reading on my smartphone. Looking great!
I just wonder: can we inject the initializer to the runtime upon creation so that we don't have to expose a getter?

@daniellienert
Copy link
Member Author

@bwaidelich - we decided upon making the initializer configurable via the form definition. This means, it is not simply injectable but would need some type of factory. In this case the formDefinition acts as factory for lots of objects - so this getter fits into the existing architecture.

@daniellienert daniellienert merged commit b88f8d2 into master Jun 7, 2022
@daniellienert daniellienert deleted the feature/simple-form-initializer branch June 7, 2022 15:40
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.

Make form state initialization more flexible
2 participants