@@ -7,6 +7,7 @@ import type {
77 IRatingFieldOptions ,
88 IDatetimeFormatting ,
99 ILinkCellValue ,
10+ SingleLineTextDisplayType ,
1011} from '@teable/core' ;
1112import { CellValueType , FieldType } from '@teable/core' ;
1213import type { IFieldInstance } from '../../model' ;
@@ -28,7 +29,7 @@ interface ICellValueContainer extends ICellValue<unknown> {
2829}
2930
3031export const CellValue = ( props : ICellValueContainer ) => {
31- const { field, value, maxWidth , ellipsis, className, itemClassName, formatImageUrl } = props ;
32+ const { field, value, ellipsis, className, itemClassName, formatImageUrl } = props ;
3233 const { type, options, cellValueType } = field ;
3334
3435 switch ( type ) {
@@ -78,7 +79,6 @@ export const CellValue = (props: ICellValueContainer) => {
7879 options = { transformSelectOptions ( options . choices ) }
7980 className = { className }
8081 itemClassName = { itemClassName }
81- maxWidth = { maxWidth }
8282 ellipsis = { ellipsis }
8383 />
8484 ) ;
@@ -91,7 +91,6 @@ export const CellValue = (props: ICellValueContainer) => {
9191 value = { value as IUserCellValue | IUserCellValue [ ] }
9292 className = { className }
9393 itemClassName = { itemClassName }
94- maxWidth = { maxWidth }
9594 formatImageUrl = { formatImageUrl }
9695 />
9796 ) ;
@@ -131,6 +130,7 @@ export const CellValue = (props: ICellValueContainer) => {
131130 value = { value as string }
132131 formatting = { options . formatting as IDatetimeFormatting }
133132 className = { className }
133+ ellipsis = { ellipsis }
134134 />
135135 ) ;
136136 }
@@ -141,19 +141,26 @@ export const CellValue = (props: ICellValueContainer) => {
141141 value = { value as number }
142142 formatting = { options . formatting as INumberFormatting }
143143 className = { className }
144+ ellipsis = { ellipsis }
144145 />
145146 ) ;
146147 }
147148
148- return < CellText value = { value as string } className = { className } /> ;
149+ return (
150+ < CellText
151+ value = { value as string }
152+ className = { className }
153+ ellipsis = { ellipsis }
154+ displayType = { options . showAs ?. type as SingleLineTextDisplayType }
155+ />
156+ ) ;
149157 }
150158 case FieldType . Link : {
151159 return (
152160 < CellLink
153161 value = { value as ILinkCellValue | ILinkCellValue [ ] }
154162 className = { className }
155163 itemClassName = { itemClassName }
156- maxWidth = { maxWidth }
157164 />
158165 ) ;
159166 }
0 commit comments