File tree 5 files changed +11
-15
lines changed
5 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -264,16 +264,13 @@ export class TableLayout<
264
264
) ;
265
265
}
266
266
267
- const cellValueParser =
268
- ( cell . getValueParser ( ) ?? row . getCellValueParser ( ) ??
269
- (
270
- isHeaderRow
271
- ? column ?. getHeaderValueParser ( )
272
- : column ?. getCellValueParser ( )
273
- ) ??
274
- ( isHeaderRow
275
- ? this . table . getHeaderValueParser ( )
276
- : this . table . getCellValueParser ( ) ) ) as ValueParser < CellValue > ;
267
+ const cellValueParser = ( cell . getValueParser ( ) ?? row . getValueParser ( ) ??
268
+ (
269
+ isHeaderRow ? column ?. getHeaderValueParser ( ) : column ?. getValueParser ( )
270
+ ) ??
271
+ ( isHeaderRow
272
+ ? this . table . getHeaderValueParser ( )
273
+ : this . table . getValueParser ( ) ) ) as ValueParser < CellValue > ;
277
274
278
275
if ( cellValueParser ) {
279
276
cell . value ( cellValueParser ) ;
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ export interface CellOptions<TValue extends CellValue> {
31
31
rowSpan ?: number ;
32
32
/** Cell cell alignment direction. */
33
33
align ?: Direction ;
34
- // value?: ValueParser<TValue>;
35
- value ?( value : TValue ) : ValueParserResult ;
34
+ value ?: ValueParser < TValue > ;
36
35
/**
37
36
* Any unterminated ANSI formatting overflowed from previous lines of a
38
37
* multi-line cell.
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export class Column<
164
164
}
165
165
166
166
/** Get value parser. */
167
- getCellValueParser ( ) : ValueParser < TValue > | undefined {
167
+ getValueParser ( ) : ValueParser < TValue > | undefined {
168
168
return this . opts . value ;
169
169
}
170
170
}
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export class Row<
156
156
}
157
157
158
158
/** Get value parser. */
159
- public getCellValueParser ( ) : ValueParser < GetCellValue < TCell > > | undefined {
159
+ public getValueParser ( ) : ValueParser < GetCellValue < TCell > > | undefined {
160
160
return this . options . value ;
161
161
}
162
162
}
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ export class Table<
412
412
}
413
413
414
414
/** Get value parser. */
415
- public getCellValueParser ( ) :
415
+ public getValueParser ( ) :
416
416
| ValueParser < GetRowInnerValue < TRow > >
417
417
| undefined {
418
418
return this . options . value ;
You can’t perform that action at this time.
0 commit comments