fixing the table, form dialog tab layout issues (#1671)

This commit is contained in:
Leila Lali
2018-06-19 10:55:23 -07:00
committed by GitHub
parent 80ab19ac23
commit e686fed209
9 changed files with 52 additions and 31 deletions

View File

@@ -146,11 +146,12 @@ export abstract class ComponentBase extends Disposable implements IComponent, On
return this.height ? this.convertSize(this.height) : '';
}
protected convertSize(size: number | string): string {
protected convertSize(size: number | string, defaultValue?: string): string {
defaultValue = defaultValue || '';
if (types.isUndefinedOrNull(size)) {
return '100%';
return defaultValue;
}
let convertedSize: string = size ? size.toString() : '100%';
let convertedSize: string = size ? size.toString() : defaultValue;
if (!convertedSize.toLowerCase().endsWith('px') && !convertedSize.toLowerCase().endsWith('%')) {
convertedSize = convertedSize + 'px';
}