Skip to content
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

eventEdit items config should not be of type Array #1744

Closed
chuckn0rris opened this issue Oct 26, 2020 · 0 comments
Closed

eventEdit items config should not be of type Array #1744

chuckn0rris opened this issue Oct 26, 2020 · 0 comments
Assignees
Labels
bug Something isn't working forum Issues from forum resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@chuckn0rris
Copy link

chuckn0rris commented Oct 26, 2020

Forum post

According to our docs, items config for eventEdit feature may be specified as object and as an array: https://bryntum.com/docs/scheduler/#Scheduler/feature/base/EditBase#config-items
In case it was specified as array, it replaces all fields in EventEditor and an error occurred in the console.
Update the docs with the info about replacing all fields if used an array notation.
Add tests.

Try this config that may be used with our basic example:

eventEdit : {
        items : [{
            type    : 'number',
            name    : 'hours',
            label   : 'Hours',
            weight   : 1,
            dataset : { }
        }],
    },

Error text:

RecurringEventEdit.js:93 Uncaught (in promise) TypeError: Cannot set property 'menu' of undefined
    at EventEdit.onEditorConstructed (RecurringEventEdit.js:93)
    at EventEdit.getEditor (EventEdit.js:546)
    at EventEdit.internalShowEditor (EventEdit.js:621)
    at EventEdit.doEditEvent (EventEdit.js:757)
    at EventEdit.editEvent (EventEdit.js:727)
    at Scheduler.internalAddEvent (SchedulerBase.js:536)
    at Scheduler.onSchedulerDblClick (SchedulerBase.js:369)
    at Scheduler.trigger (Events.js:1057)
    at Scheduler.handleScheduleEvent (TimelineDomEvents.js:127)
    at HTMLDivElement.handler (EventHelper.js:510)

Screenshot 2020-10-26 at 16 36 02

@chuckn0rris chuckn0rris added bug Something isn't working forum Issues from forum labels Oct 26, 2020
@matsbryntse matsbryntse changed the title An error if items config for eventEdit was specified as array eventEdit items config should not be of type Array Oct 27, 2020
@matsbryntse matsbryntse self-assigned this Oct 27, 2020
@matsbryntse matsbryntse added the ready for review Issue is fixed, the pull request is being reviewed label Oct 27, 2020
@matsbryntse matsbryntse added this to the Scheduler 4.0.1 milestone Oct 27, 2020
@matsbryntse matsbryntse added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Nov 1, 2020
@SergeyMaltsev SergeyMaltsev modified the milestones: Scheduler 4.0.1, 4.1.0-rc-1 Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

3 participants