LearnNewsExamplesServices
Frontmatter
id1556
titleMissing some classes modules in _export.mjs files
stateClosed
labels
bug
assignees[]
createdAtMar 21, 2021, 5:21 PM
updatedAtMar 21, 2021, 5:28 PM
githubUrlhttps://github.com/neomjs/neo/issues/1556
authorwemersonjanuario
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 21, 2021, 5:28 PM

Missing some classes modules in _export.mjs files

Closed v8.1.0 bug
wemersonjanuario
wemersonjanuario commented on Mar 21, 2021, 5:21 PM

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:

  1. Create a Form class that uses all fields
  2. import * as field from '../../../node_modules/neo.mjs/src/form/field/_export.mjs';
  3. Add all form fields to form items
  4. 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

img-2021-03-21-13-12-57

img-2021-03-21-12-26-42

Desktop :

  • OS: Windows 10
  • Browser Chrome
  • Version 89.0

Smartphone (please complete the following information): Not Tested

wemersonjanuario added the bug label on Mar 21, 2021, 5:21 PM
wemersonjanuario cross-referenced by PR #1557 on Mar 21, 2021, 5:26 PM
tobiu closed this issue on Mar 21, 2021, 5:28 PM