-
Notifications
You must be signed in to change notification settings - Fork 16
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
Should allow ember components as custom form widgets. #23
Comments
cc @jschilli |
@toddjordan have conversations queued up with my team to discuss - will advise |
👍 |
I've started work on giving the addon the ability to render ember components. I started by giving it the concept of a renderer, currently with the default of alpaca. Second step is to take alpaca and its dependencies (including bootstrap) out of the mix. |
Update: A renderer will provide 2 functions:
I'm Writing an ember-paper renderer and adding an example usage to the documentation examples. This will come in the next few weeks, but I'll try to update this periodically. cc: @k3n @jschilli |
I've checked in updates to master that will allow a developer to hook in a custom renderer. Custom renderer could be inserted as follows: import Ember from 'ember';
export default Ember.Object.extend({
initLayout(component) {
//set the component's template via layout and layoutName
},
render(schema, component) {
//set properties/actions for the template based on the schema
}
} 2 implement renderer to render you components 3.set the new renderer as the current renderer in environment.js: ENV.dynamicForms = {
renderer: 'my-renderer'
} |
One note: I had to place the file in |
hmmm. will make an update to fix. Thanks |
@k3n I've released version 0.2.0, which has the same functionality, but now wants you to load any custom renderer through the |
Currently alpaca allows you to "register" new form field widget types by extending their field objects. This issue is to explore what it might take to get it to use ember components as a widget.
Start here: http://www.alpacajs.org/docs/api/custom-fields.html
The text was updated successfully, but these errors were encountered: