Our blazing fast Grid component built with pure JavaScript


Post by henrique »

I wonder why layout classes are not exported to the typescript definition file?


Post by Animal »

They are never needed to be instantiated. They are only used by Containers (Such as the base Container class, Panel, and of course TabPanel which uses Card layout).

You specify the layout type in the Container's config using the name as a string:

myPanel = new Panel({
    title  : 'This Panel shows muiltiple children one at a time',
    layout : 'card',
    items  : [child1, child2, child3]
});

Post by henrique »

I agree, but neither the settings have in the typescript definition file.

I found the possible settings, looking at the sources, I managed to do what I needed, but it would be very interesting, at least the settings be exported.


Post by sergey.maltsev »

Hi!

Unfortunately currently we have no such values in typings file.
This is Feature Request to add those:
https://github.com/bryntum/support/issues/3583


Post by johan.isaksson »

Hi,

An update on the topic. In version 5.1.0 we will specify available options where possible for string types. For example eventLayout in Scheduler, which is currently defined like this in the typings:

eventLayout: string

Will starting with 5.1.0 instead be declared as:

eventLayout: 'stack'|'pack'|'none'

We aim to improve on this moving forward, by adding enums or similar for more complex cases (such as time units, we allow many different ways of specifying them)

Best regards,
Johan Isaksson

Post Reply