jQWidgets Forums

jQuery UI Widgets Forums Angular jqxsplitter size panels

This topic contains 2 replies, has 2 voices, and was last updated by  Gary 8 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • jqxsplitter size panels #93009

    Gary
    Participant

    I receive the following TypeScript error when setting jqxSplitter panel values for size and min. properties. When properties set as numeric all works.

    Running JQWIDGETS: 4.5.1 Angular: 4.0.0 TypeScript: 2.2.0

    Code Snippet.

    mainSplitterSettings: jqwidgets.SplitterOptions =
    {
    width: ‘100%’,
    height: ‘100%’,
    theme: ‘energyblue’,
    resizable: false,
    panels: [
    {
    size: ‘75%’,
    min: ‘10%’,
    collapsible: false,
    },
    {
    min: ‘10%’,
    size: ‘10%’,
    collapsible: false,

    }
    ]
    };
    contentSplitterSettings: jqwidgets.SplitterOptions =
    {
    width: ‘100%’,
    height: ‘100%’,
    theme: ‘energyblue’,
    orientation: ‘horizontal’,
    resizable: false,
    panels: [
    {
    size: ‘75%’, // CONTROLS THE SIZE OF UPPER PANEL WHEN LOWER PANEL IS OP
    min: ‘10%’,
    collapsible: false,
    },
    {
    min: ‘10%’,
    collapsed: true,
    collapsible: true
    }
    ]
    };

    Typescript error:

    Error:(119, 5) TS2322:Type ‘{ width: string; height: string; theme: string; resizable: false; panels: { size: string; min: st…’ is not assignable to type ‘SplitterOptions’.
    Types of property ‘panels’ are incompatible.
    Type ‘{ size: string; min: string; collapsible: false; }[]’ is not assignable to type ‘SplitterPanel[]’.
    Type ‘{ size: string; min: string; collapsible: false; }’ is not assignable to type ‘SplitterPanel’.
    Types of property ‘size’ are incompatible.
    Type ‘string’ is not assignable to type ‘number’.
    Error:(139, 5) TS2322:Type ‘{ width: string; height: string; theme: string; orientation: string; resizable: false; panels: ({…’ is not assignable to type ‘SplitterOptions’.
    Types of property ‘panels’ are incompatible.
    Type ‘({ size: string; min: string; collapsible: false; } | { min: string; collapsed: true; collapsible…’ is not assignable to type ‘SplitterPanel[]’.
    Type ‘{ size: string; min: string; collapsible: false; } | { min: string; collapsed: true; collapsible:…’ is not assignable to type ‘SplitterPanel’.
    Type ‘{ size: string; min: string; collapsible: false; }’ is not assignable to type ‘SplitterPanel’.
    Types of property ‘size’ are incompatible.
    Type ‘string’ is not assignable to type ‘number’.

    jqxsplitter size panels #93020

    Stanislav
    Participant

    Hello Gary,

    Thank you for the report. This will be fixed.
    For now, you can go to the typings file(jqwidgets.d.ts), find SplitterPanel and change size and min types to number | string.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    jqxsplitter size panels #93039

    Gary
    Participant

    Stanislav,

    It works.

    Thanks,
    Gary

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.