bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Fix typings for responsiveLevels #6466

Open chuckn0rris opened 1 year ago

chuckn0rris commented 1 year ago

Forum post

Just upgraded from 5.2.2 to 5.3.1, and the scheduler config broke, fixed some changes which was fine, but it seems what the types indicate and what the docs do on responsiveLevels do differs from each other. Both versions are 5.3.1.

As for types: ScheudlerConfig at scheduler.d.ts defines it's property responsiveLevels: Record<string, number|string>Grid.column.Column#config-responsiveLevels defines it as an Object, further defining "Column settings at different responsive levels, see responsive demo under examples/".

The same problem is present for the columns config: Grid.column.Column#config-responsiveLevels

The referenced example has following code:

responsiveLevels : {
        small : {
            levelWidth : 800,
            tickSize   : 127,
            fillTicks  : true,
            rowHeight  : 40
        },
        normal : {
            levelWidth : '*',
            tickSize   : 150,
            fillTicks  : false,
            rowHeight  : 50
        }
    }

This does not correspond with what the types dictate, and I'm not quite sure what is supposed to be the correct definition for this.

chuckn0rris commented 2 months ago

user pinged, still not fixed in 6..0.x