File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
packages/main/src/components/AnalyticalTable Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -155,15 +155,17 @@ const meta = {
155155 } ,
156156 {
157157 Header : 'Age' ,
158- accessor : 'age'
158+ accessor : 'age' ,
159+ hAlign : 'End'
159160 } ,
160161 {
161162 Header : 'Friend Name' ,
162163 accessor : 'friend.name'
163164 } ,
164165 {
165166 Header : 'Friend Age' ,
166- accessor : 'friend.age'
167+ accessor : 'friend.age' ,
168+ hAlign : 'End'
167169 }
168170 ] ,
169171 highlightField : 'status' ,
Original file line number Diff line number Diff line change @@ -139,17 +139,17 @@ export const ColumnHeaderModal = (instance: TableInstanceWithPopoverProps) => {
139139 const horizontalAlign = ( ( ) => {
140140 switch ( column . hAlign ) {
141141 case TextAlign . Begin :
142- return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
142+ return PopoverHorizontalAlign . Start ;
143143 case TextAlign . End :
144- return isRtl ? PopoverHorizontalAlign . Start : PopoverHorizontalAlign . End ;
144+ return PopoverHorizontalAlign . End ;
145145 case TextAlign . Left :
146- return PopoverHorizontalAlign . Start ;
146+ return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
147147 case TextAlign . Right :
148- return PopoverHorizontalAlign . End ;
148+ return isRtl ? PopoverHorizontalAlign . Start : PopoverHorizontalAlign . End ;
149149 case TextAlign . Center :
150150 return PopoverHorizontalAlign . Center ;
151151 default :
152- return isRtl ? PopoverHorizontalAlign . End : PopoverHorizontalAlign . Start ;
152+ return PopoverHorizontalAlign . Start ;
153153 }
154154 } ) ( ) ;
155155
Original file line number Diff line number Diff line change @@ -512,11 +512,11 @@ export interface AnalyticalTableColumnDefinition {
512512 /**
513513 * Horizontal alignment of the cell.
514514 */
515- hAlign ?: TextAlign ;
515+ hAlign ?: TextAlign | keyof typeof TextAlign ;
516516 /**
517517 * Vertical alignment of the cell.
518518 */
519- vAlign ?: VerticalAlign ;
519+ vAlign ?: VerticalAlign | keyof typeof VerticalAlign ;
520520 /**
521521 * Allows passing a custom string for the internal width calculation of custom cells for `scaleWidthMode` `Grow` and `Smart`.
522522 *
You can’t perform that action at this time.
0 commit comments