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

Adding custom inputs #912

Open
basz opened this issue Feb 17, 2023 · 0 comments
Open

Adding custom inputs #912

basz opened this issue Feb 17, 2023 · 0 comments
Assignees
Labels

Comments

@basz
Copy link

basz commented Feb 17, 2023

Hi, I can't seem to add an additional input type.

For example an 'MyComplexUIComponent'.

I am able to override the existing component with the ember-cli-build override, but when i add a new one this breaks.

'ember-validated-form': {
      defaults: {
        'types/custom-complex-ui': 'myapp/components/validated-form/my-custom-complex-ui',
      },
    },

Because render needs to be aware of the custom i override that as well and add a block to it.

However, to ensure @passedOrDefault works correctly with added entries I need to add the following to the 'index.js' (at the end).

 Object.keys(defaults).map (key => {
     this.options["@embroider/macros"].setOwnConfig[key] = defaults[key];
 });

This way getOwnConfig (from embroider) has access to these (new) definitions and my component renders. Is this an oversight?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants