sending the alignment value straight from props instead of numbers

This commit is contained in:
ahmed-Bazzara
2019-02-19 14:55:50 +01:00
parent ec140efc56
commit bcb9d30237
2 changed files with 6 additions and 11 deletions

View File

@@ -92,13 +92,8 @@ class DataCell extends React.PureComponent {
}
let textAlignment = 'Right';
const textAlignmentProp = styling.options.textAlignment;
if (textAlignmentProp === 1) {
textAlignment = 'Left';
} else if (textAlignmentProp === 2) {
textAlignment = 'Center';
} else {
textAlignment = 'Right';
if (textAlignmentProp) {
textAlignment = textAlignmentProp;
}
let cellStyle = {

View File

@@ -189,19 +189,19 @@ const formatted = {
component: 'buttongroup',
options: [
{
value: 1,
value: 'Left',
label: 'Left'
},
{
value: 2,
value: 'Center',
label: 'Center'
},
{
value: 3,
value: 'Right',
label: 'Right'
}
],
defaultValue: 3
defaultValue: 'Right'
},
ColumnWidthSlider: {
type: 'number',