-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RxDocument - number field is set to null #215
Comments
I can reproduce the error because of setting |
BrowserI'm using Chrome browser. StepsChanges i made:
In the component:
Where getCollection('person') return Person collection from _createCollections. In the template: ErrorWhen i delete the 0 in the age filed of the form i get this error in console:
From now every time i type a digit in the field i get the same error in console. If never empty age field i never get error. |
This helps a bit. But it's not complete. There is not person-collection in the ng2-example. Can you fork this repo and implement the changes in the fork? EDIT: I could reproduce this now. I will investigate.. |
Fixed with this commit. (Accidentially set the wrong commit-number) |
Issue fixed, thanks |
Case
Bug
Issue
I try to use an RxDocument as described in the examples but the schema have a number field. When i create the form all works well but when an user write a number in the number field and then delete it the field is set to null.
This generate an error (see Code section) that block all changes to the RxDocument while the page is refreshed.
If i try to save the document after delete and rewrite the number field without page refresh, i get a validation error on the number field because it is still set to null.
For the code refer to https://github.com/pubkey/rxdb/tree/master/examples/angular2/app/src/components/hero-insert
Info
Code
For the code refer to https://github.com/pubkey/rxdb/tree/master/examples/angular2/app/src/components/hero-insert
ERROR TypeError: Cannot read property 'defineGetter' of null
at RxDocument.js:239
at Array.forEach ()
at RxDocument._defineGetterSetter (RxDocument.js:235)
at RxDocument.get (RxDocument.js:223)
at RxDocument.foglio (RxDocument.js:240)
at Object.eval [as updateDirectives] (RegistroAddComponent.html:38)
at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:13108)
at checkAndUpdateView (core.es5.js:12288)
at callViewAction (core.es5.js:12653)
at execEmbeddedViewsAction (core.es5.js:12611)
The text was updated successfully, but these errors were encountered: