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.
-
Authorjqxsplitter size panels Posts
-
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’.Hello Gary,
Thank you for the report. This will be fixed.
For now, you can go to the typings file(jqwidgets.d.ts
), findSplitterPanel
and changesize
andmin
types tonumber | string
.Best Regards,
StanislavjQWidgets Team
http://www.jqwidgets.com/Stanislav,
It works.
Thanks,
Gary -
AuthorPosts
You must be logged in to reply to this topic.