asked on
...
let defaultCommonWidth = 200;
_columns.push({
width:defaultCommonWidth,
textAlign:'left'
})
_columns.push({
width:defaultCommonWidth,
textAlign:'left'
})
...
let defaultCommonWidth = 200;
let myvariable=[{
width:defaultCommonWidth,
textAlign:'left'
}];
_columns.push({
style: myvariable
})
_columns.push({
style: myvariable
})
ASKER
ASKER
let defaultCommonWidth = 200;
_columns.push({
height: 200,
width: defaultCommonWidth
}]
_columns.push({
style: myvariable
})
let myvariable = {width:200};
but even this simple example doesn't work. Am I using style wrong?
ASKER
ASKER
let myvariable={
width:300,
textAlign:'left'
};
_columns.push({
style: myvariable,
//style: {width: 200},
//width:200,
//textAlign: 'left',
name: 'Match Key',
title: 'Match Key'
});
{width: '200px'}
Width style requires a unit
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
Open in new window