Our pure JavaScript Scheduler component


Post by bruno.pereira »

Hi,

I noticed that by default the lock rows feature allows the locked row to expand until approximately half the size of the schedule (including header) before it shows the scroll bar:
https://imgur.com/9kZvkHw

Is there a way to set the "maximum height" for the locked row so we can control how much it expands when we move events into it?

best regards,
Bruno


Post by mats »

Try configuring like so:

const scheduler = new Scheduler({
    maxHeight  : 200,
    autoHeight : true,
    features   : {

    lockRows : {
        fieldName        : 'favorite',
        bottomGridConfig : {
            maxHeight   : undefined,
            autoHeight  : false

        }
    },

Post by bruno.pereira »

Hi,

Thanks for the quick reply.
The above solutions doesn't allow me to configure the height of the lock row it still expands to half of the schedule if I add overlapping events.
https://imgur.com/AERwO8P

Tested it here: https://www.bryntum.com/products/scheduler/docs/#Scheduler/feature/LockRows

With the following code:

const resources = ArrayHelper.populate(50, i => ({ id : i, name : `Resource ${i}` }), true);
resources[0].inactive = true;

const scheduler = new Scheduler({
    maxHeight  : 200,
    autoHeight : true,
    appendTo : targetElement,
    startDate : new Date(2023, 4, 22),
    endDate   : new Date(2023, 5, 30),

features : {
    lockRows : {
        fieldName : 'inactive',
        bottomGridConfig : {
            maxHeight   : undefined,
            autoHeight  : false

        }
    },
},

columns : [
    { field : 'name', text : 'Name', width : 100 },
    { field : 'inactive', text : 'Inactive', type : 'check' }
],

resources,

events : ArrayHelper.populate(200, i => ({ id : i, name : `Event ${i}`, resourceId : i % 50, startDate : new Date(2023, 4, 22, i * 12), duration : 4 }), true)
});

Post by ghulam.ghous »

Hey there,

We don't know any workaround at the moment, but we have opened a FR to make this configurable which will enable you to set the height. https://github.com/bryntum/support/issues/11300

Please subscribe to the ticket to keep track of updates.


Post by bruno.pereira »

Thank you!


Post Reply