"TypeError: this.options.changes.startWith is not a function" with Enum
See original GitHub issueNew to A2JSF. Trying to do basic example.
I have an enum schema object:
"status": { "type": "string", "enum": [ "Draft", "Published" ], "title": "Status" },
Whenever I have such an enum, I get this error:
ERROR TypeError: this.options.changes.startWith is not a function at MdSelect.webpackJsonp.../../../../angular2-json-schema-form/angular2-json-schema-form.es5.js.MdSelect.ngAfterContentInit (angular2-json-schema-form.es5.js:50477) at callProviderLifecycles (core.es5.js:11234) at callElementProvidersLifecycles (core.es5.js:11215) at callLifecycleHooksChildrenFirst (core.es5.js:11199) at checkAndUpdateView (core.es5.js:12291) at callViewAction (core.es5.js:12651) at execComponentViewsAction (core.es5.js:12583) at checkAndUpdateView (core.es5.js:12294) at callViewAction (core.es5.js:12651) at execEmbeddedViewsAction (core.es5.js:12609)
The pull-down is rendered. It responds to initial click by pulling-down, and is otherwise unresponsive.
Have A2JSF 0.4.0-alpha.16 and rxjs (with startWith) 5.4.1.
Maybe something dumb on my end, but I can’t see it. Helpl! John
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
Try adding
import 'rxjs/add/operator/startWith';
to your components which use json-schema-form, it worked for me (note: I am using material-design).Yes, unfortunately, a current limitation of this library is that it requires the
@angular/material
and@angular/cdk
packages be installed, even if you only want to display your form using the Bootstrap framework. This will be fixed in a future version, and until then is being tracked as bug #67 .