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

"static" in CheckMatrix #9

Closed
dmenne opened this issue Sep 30, 2019 · 2 comments
Closed

"static" in CheckMatrix #9

dmenne opened this issue Sep 30, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@dmenne
Copy link
Contributor

dmenne commented Sep 30, 2019

This could be a variant of #8. Since all links to custom component on Google link to this example, it would be important to get it to work.

I do not fully understand the rather confusing state of "static" in Javascript and Babel, but all my compiler settings (including the original from github) give an error for
static builderInfo. Putting it into the constructor works syntaxtically.

Nevertheless, CheckMatrixdoes not appear in the Builder.

 constructor(component, options, data) {
    super(component, options, data);
    this.builderInfo = {
      title: 'Check Matrix',
      group: 'basic',
      icon: 'fa fa-table',
      weight: 70,
      documentation: 'http://help.form.io/userguide/#table',
      schema: CheckMatrix.schema()
    };
  this.editForm = editForm;
  }

@dmenne dmenne added the bug Something isn't working label Sep 30, 2019
@dmenne
Copy link
Contributor Author

dmenne commented Oct 2, 2019

Old style static works

// Use the table component edit form.
CheckMatrix.editForm = editForm;
CheckMatrix.builderInfo = {
  title: 'Check Matrix',
  group: 'basic',
  icon: 'fa fa-table',
  weight: 70,
  documentation: 'http://help.form.io/userguide/#table',
  schema: CheckMatrix.schema()
};

// Register the component to the Formio.Components registry.
Components.addComponent('checkmatrix', CheckMatrix);

@dmenne dmenne closed this as completed Oct 2, 2019
@ashleyasli
Copy link

ashleyasli commented Oct 16, 2019

I faced the same issue and your solution works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants