Describe the bug
Error while using no-exported fields classes in form container.
import Form from '../../../node_modules/neo.mjs/src/form/Container.mjs';
import Toolbar from '../../../node_modules/neo.mjs/src/container/Toolbar.mjs';
import Button from '../../../node_modules/neo.mjs/src/button/Base.mjs';
import * as field from '../../../node_modules/neo.mjs/src/form/field/_export.mjs';
class MyForm extends Form {
static getConfig() {
return {
className: 'MyApp.view.MyForm',
ntype: 'my-form',
layout: {
ntype: 'vbox'
},
items: [{
module: field.Text,
required: true,
labelText: 'Text',
placeholderText: 'placeholder'
}, {
module: field.Number,
labelText: 'Number',
clearable: true
}, {
module: field.Select,
labelText: 'Select',
clearable: true
}, {
module: field.Email,
labelText: 'Email'
}, {
module: field.Password,
labelText: 'Password'
}, {
module: field.Search,
labelText: 'Search'
}, {
module: field.TextArea,
labelText: 'TextArea'
}, {
module: field.Date,
labelText: 'Date'
}, {
module: field.Time,
labelText: 'Time'
}, {
ntype: 'component',
flex: 1
}, {
module: Toolbar,
dock: 'bottom',
layout: {
ntype: 'hbox',
pack: 'end'
},
items: ['->', {
module: Button,
text: 'Save'
}]
}]
}
}
}
Neo.applyClassConfig(MyForm);
export {MyForm as default}
To Reproduce
Steps to reproduce the behavior:
- Create a Form class that uses all fields
- import * as field from '../../../node_modules/neo.mjs/src/form/field/_export.mjs';
- Add all form fields to form items
- See error - Uncaught (in promise) Error: Class defined with object configuration missing ntype property. undefined
Expected behavior
No errors, all fields should be imported by _export.mjs
Screenshots
Desktop :
- OS: Windows 10
- Browser Chrome
- Version 89.0
Smartphone (please complete the following information):
Not Tested
Describe the bug Error while using no-exported fields classes in form container.
import Form from '../../../node_modules/neo.mjs/src/form/Container.mjs'; import Toolbar from '../../../node_modules/neo.mjs/src/container/Toolbar.mjs'; import Button from '../../../node_modules/neo.mjs/src/button/Base.mjs'; import * as field from '../../../node_modules/neo.mjs/src/form/field/_export.mjs'; class MyForm extends Form { static getConfig() { return { className: 'MyApp.view.MyForm', ntype: 'my-form', layout: { ntype: 'vbox' }, items: [{ module: field.Text, required: true, labelText: 'Text', placeholderText: 'placeholder' }, { module: field.Number, labelText: 'Number', clearable: true }, { module: field.Select, labelText: 'Select', clearable: true }, { module: field.Email, labelText: 'Email' }, { module: field.Password, labelText: 'Password' }, { module: field.Search, labelText: 'Search' }, { module: field.TextArea, labelText: 'TextArea' }, { module: field.Date, labelText: 'Date' }, { module: field.Time, labelText: 'Time' }, { ntype: 'component', flex: 1 }, { module: Toolbar, dock: 'bottom', layout: { ntype: 'hbox', pack: 'end' }, items: ['->', { module: Button, text: 'Save' }] }] } } } Neo.applyClassConfig(MyForm); export {MyForm as default}To Reproduce Steps to reproduce the behavior:
Expected behavior No errors, all fields should be imported by _export.mjs
Screenshots
Desktop :
Smartphone (please complete the following information): Not Tested