File tree 3 files changed +11
-9
lines changed
packages/main/src/components/AnalyticalTable
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -155,15 +155,17 @@ const meta = {
155
155
} ,
156
156
{
157
157
Header : 'Age' ,
158
- accessor : 'age'
158
+ accessor : 'age' ,
159
+ hAlign : 'End'
159
160
} ,
160
161
{
161
162
Header : 'Friend Name' ,
162
163
accessor : 'friend.name'
163
164
} ,
164
165
{
165
166
Header : 'Friend Age' ,
166
- accessor : 'friend.age'
167
+ accessor : 'friend.age' ,
168
+ hAlign : 'End'
167
169
}
168
170
] ,
169
171
highlightField : 'status' ,
Original file line number Diff line number Diff line change @@ -139,17 +139,17 @@ export const ColumnHeaderModal = (instance: TableInstanceWithPopoverProps) => {
139
139
const horizontalAlign = ( ( ) => {
140
140
switch ( column . hAlign ) {
141
141
case TextAlign . Begin :
142
- return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
142
+ return PopoverHorizontalAlign . Start ;
143
143
case TextAlign . End :
144
- return isRtl ? PopoverHorizontalAlign . Start : PopoverHorizontalAlign . End ;
144
+ return PopoverHorizontalAlign . End ;
145
145
case TextAlign . Left :
146
- return PopoverHorizontalAlign . Start ;
146
+ return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
147
147
case TextAlign . Right :
148
- return PopoverHorizontalAlign . End ;
148
+ return isRtl ? PopoverHorizontalAlign . Start : PopoverHorizontalAlign . End ;
149
149
case TextAlign . Center :
150
150
return PopoverHorizontalAlign . Center ;
151
151
default :
152
- return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
152
+ return PopoverHorizontalAlign . Start ;
153
153
}
154
154
} ) ( ) ;
155
155
Original file line number Diff line number Diff line change @@ -512,11 +512,11 @@ export interface AnalyticalTableColumnDefinition {
512
512
/**
513
513
* Horizontal alignment of the cell.
514
514
*/
515
- hAlign ?: TextAlign ;
515
+ hAlign ?: TextAlign | keyof typeof TextAlign ;
516
516
/**
517
517
* Vertical alignment of the cell.
518
518
*/
519
- vAlign ?: VerticalAlign ;
519
+ vAlign ?: VerticalAlign | keyof typeof VerticalAlign ;
520
520
/**
521
521
* Allows passing a custom string for the internal width calculation of custom cells for `scaleWidthMode` `Grow` and `Smart`.
522
522
*
You can’t perform that action at this time.
0 commit comments