aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-02-08 10:03:39 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-02-08 10:03:39 +0100
commit4f254611db890b2cac96984644f1049bd7cf0e72 (patch)
tree4506808d200e6bdd78ff2b264795d067ab9dbab0
parentfix linting errors (diff)
downloadferdium-app-4f254611db890b2cac96984644f1049bd7cf0e72.tar.gz
ferdium-app-4f254611db890b2cac96984644f1049bd7cf0e72.tar.zst
ferdium-app-4f254611db890b2cac96984644f1049bd7cf0e72.zip
fix(App) Bugfix Fix toggle buttons shown during import
moved form definition to `componentWillMount`
-rw-r--r--src/components/auth/Import.js28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js
index 6bfd2d70f..eb0debd39 100644
--- a/src/components/auth/Import.js
+++ b/src/components/auth/Import.js
@@ -41,20 +41,22 @@ export default class Import extends Component {
41 intl: intlShape, 41 intl: intlShape,
42 }; 42 };
43 43
44 config = { 44 componentWillMount() {
45 fields: { 45 const config = {
46 import: [...this.props.services.filter(s => s.recipe).map(s => ({ 46 fields: {
47 fields: { 47 import: [...this.props.services.filter(s => s.recipe).map(s => ({
48 add: { 48 fields: {
49 default: true, 49 add: {
50 options: s, 50 default: true,
51 options: s,
52 },
51 }, 53 },
52 }, 54 }))],
53 }))], 55 },
54 }, 56 };
55 }; 57
56 58 this.form = new Form(config, this.context.intl);
57 form = new Form(this.config, this.context.intl); 59 }
58 60
59 submit(e) { 61 submit(e) {
60 const { services } = this.props; 62 const { services } = this.props;