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

Replacing resource which has no assignments fails #2588

Closed
pmiklashevych opened this issue Mar 30, 2021 · 1 comment
Closed

Replacing resource which has no assignments fails #2588

pmiklashevych opened this issue Mar 30, 2021 · 1 comment
Labels
bug Something isn't working not reproducible

Comments

@pmiklashevych
Copy link

pmiklashevych commented Mar 30, 2021

http://lh/bryntum-suite/schedulerpro/examples/constraints/
In console:

scheduler.eventStore.removeAll()

then

scheduler.resourceStore.data = [{ id : 1, name : 'test' }]

See the error:

HorizontalRendering.js:668 Uncaught TypeError: Cannot read property 'size' of undefined
    at HorizontalRendering.calculateRowHeight (HorizontalRendering.js:668)
    at SchedulerPro.getRowHeight (SchedulerBase.js:668)
    at Row.render (Row.js:539)
    at RowManager.renderFromRow (RowManager.js:938)
    at RowManager.reinitialize (RowManager.js:174)
    at SchedulerPro.renderRows (GridBase.js:2897)
    at functionChainRunner (InstancePlugin.js:359)
    at SchedulerPro.plugInto.<computed> [as renderRows] (InstancePlugin.js:330)
    at SchedulerPro.onStoreDataChange (GridBase.js:1579)
    at ResourceStore.trigger (Events.js:1138)

User has similar problem with undefined "assigned" property.
https://www.bryntum.com/forum/viewtopic.php?p=84722#p84722

image

Need to check AbstractResourceStoreMixin.ts and AbstractEventStoreMixin.ts in the Engine.

                for (const assignment of existingRecord.assigned) {
                    assignment.resource    = resourceRecord
                }
                    for (const assignment of existingRecord.assigned) {
                        assignment.event = eventRecord
                    }
@pmiklashevych pmiklashevych added the bug Something isn't working label Mar 30, 2021
@isglass isglass added this to the 4.1.2 milestone Mar 31, 2021
@isglass isglass modified the milestones: 4.1.2, 4.1.3, 4.1.x Apr 27, 2021
@matsbryntse matsbryntse added high-priority Urgent to have fixed and removed high-priority Urgent to have fixed labels Jun 22, 2021
@matsbryntse matsbryntse removed this from the 4.1.x milestone Jun 22, 2021
@matsbryntse
Copy link
Member

No repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not reproducible
Projects
None yet
Development

No branches or pull requests

3 participants