-
Notifications
You must be signed in to change notification settings - Fork 578
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
Fix import screen toggles #668
Conversation
- fix toggle double click event (nested `fields` property) - do not call `prepareForm` for every render but only on init (otherwise all toggles reset to `default: true`
moved form definition to `componentWillMount`
default: true, | ||
options: s, | ||
import: [...this.props.services.filter(s => s.recipe).map(s => ({ | ||
fields: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that did the trick :)
@@ -74,7 +74,6 @@ export default class Import extends Component { | |||
} | |||
|
|||
render() { | |||
this.form = this.prepareForm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would otherwise reset toggles to true on submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 great, thanks for taking care of this!
Description
import screen toggles did not work because of missing nested
fields:
property in form instance ofmobx-react-form
. also removedprepareForm()
and moved form definition tocomponentWillMount()
Motivation and Context
user should be able to select which services to import
How Has This Been Tested?
manually during signup and using route
#auth/signup/import
Screenshots (if appropriate):
Types of changes
Checklist:
$ yarn lint
).