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

Component doesnt exported by @formio/js #5975

Open
jdbaha opened this issue Jan 13, 2025 · 1 comment
Open

Component doesnt exported by @formio/js #5975

jdbaha opened this issue Jan 13, 2025 · 1 comment

Comments

@jdbaha
Copy link

jdbaha commented Jan 13, 2025

import { Templates, Components, Component } from '@formio/js';

Templates.addTemplate('mytemplate', {
    form: (ctx) => `
<div>
  <div ref="myref">
    ${ctx.foo}
    <div ref="mychild">1</div>
    <div ref="mychild">2</div>
    <div ref="mychild">3</div>
  </div>
</div>
`
});

class MyComponent extends Component {

this code not working
formio doesnt export Component
and displays error Unknown template in render

@lane-formio
Copy link
Contributor

Can you provide any additional information such as what version you are using? A code sandbox to demonstrate?

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

No branches or pull requests

2 participants