ember-validated-form
ember-validated-form copied to clipboard
Adding custom inputs
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?