Comments (8)
I am coming to a conclusion that a deprecation is at fault here:
Please use the new form.input helper defined in 1.0.0beta10
Perhaps I need to define the form and input differently
from ember-rapid-forms.
Ok, so I have changed my hbs to:
and the form works, but I hit other issues with the ember-cp-validations
integration. I will fix that and do a PR soon.
In the meantime, I think it would be worth documenting the change to the handlebars setup and/or make things work both ways (old way and new way).
from ember-rapid-forms.
@spruce it looks like the issue is that the root
in the following method evaluates to undefined
function setPath(root, path, value, tolerant) {
// get the last part of the path
var keyName = path.slice(path.lastIndexOf('.') + 1);
// get the first part of the part
path = path === keyName ? keyName : path.slice(0, path.length - (keyName.length + 1));
// unless the path is this, look up the first part to
// get the root
if (path !== 'this') {
root = _emberMetalProperty_get._getPath(root, path);
}
if (!keyName || keyName.length === 0) {
throw new _emberMetalError.default('Property set failed: You passed an empty path');
}
if (!root) {
if (tolerant) {
return;
} else {
throw new _emberMetalError.default('Property set failed: object in path "' + path + '" could not be found or was destroyed.');
}
}
return set(root, keyName, value);
}
the value of root
before these lines
if (path !== 'this') {
root = _emberMetalProperty_get._getPath(root, path);
}
has the input tag as the viewElement. So it appears that the model is not propagated down from the {{em-form}}
to the {{em-input}}
. I'll try to do some more digging today.
from ember-rapid-forms.
Another observation:
Ember.get(root, 'mainComponent.form')
> undefined
Ember.get(root, 'mainComponent.model')
> undefined
it looks like the form and thus the model reference is not being propagated to the inputs for some reason
from ember-rapid-forms.
I just noticed that this:
Ember.get(root, 'mainComponent.parentView.model')
produces the actual model
from ember-rapid-forms.
Sorry for not checking in here lately (2 month, ups). Did you have a PR on the thing you mentioned. Now the docs are showing the new way to use the forms. Should there be anything else changed?
from ember-rapid-forms.
@psteininger anything new? elsewise I gonna close this as this project doesn't support 2.10 any longer.
from ember-rapid-forms.
@spruce ok to close. It's been a long time since I solved the issue, and I just don't remember how.
from ember-rapid-forms.
Related Issues (20)
- Radio buttons HOT 1
- ember-template-compiler.js HOT 9
- object in path "mainComponent.model" and deprecation id: ember-rapid-forms.yielded-form HOT 1
- new form.input helper defined in 1.0.0beta10 HOT 3
- After refactor, page refreshes on form submit in specific cases HOT 11
- Checkbox in horizontal form HTML structure broken
- Build docs automatically HOT 3
- em-select not initialized to existing value HOT 3
- How to validate nested fields on submit? HOT 1
- Compile Error: fa-icon is not a helper in version 1.2 HOT 4
- forEach error during ember-server, caused by ember-font-awesome HOT 5
- Label customization HOT 3
- showErrorsOnRender doesn't notice validation errors HOT 1
- Users don't have to manually install dependencies
- Input of type "date" does not prefill when bound to ember model date-type attribute HOT 3
- Masking support HOT 1
- Ember 3.0.0 Deprecation - run.schedule('sync') HOT 2
- Move to Bootstrap 4 HOT 2
- action firing on component initialization expected? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-rapid-forms.