()
| 253 | }; |
| 254 | |
| 255 | const getSuffix = () => { |
| 256 | // Max length value |
| 257 | const hasMaxLength = Number(mergedMax) > 0; |
| 258 | |
| 259 | if (suffix || countConfig.show) { |
| 260 | const dataCount = countConfig.showFormatter |
| 261 | ? countConfig.showFormatter({ |
| 262 | value: formatValue, |
| 263 | count: valueLength, |
| 264 | maxLength: mergedMax, |
| 265 | }) |
| 266 | : `${valueLength}${hasMaxLength ? ` / ${mergedMax}` : ''}`; |
| 267 | |
| 268 | return ( |
| 269 | <> |
| 270 | {countConfig.show && ( |
| 271 | <span |
| 272 | className={clsx( |
| 273 | `${prefixCls}-show-count-suffix`, |
| 274 | { |
| 275 | [`${prefixCls}-show-count-has-suffix`]: !!suffix, |
| 276 | }, |
| 277 | classNames?.count, |
| 278 | )} |
| 279 | style={{ |
| 280 | ...styles?.count, |
| 281 | }} |
| 282 | > |
| 283 | {dataCount} |
| 284 | </span> |
| 285 | )} |
| 286 | {suffix} |
| 287 | </> |
| 288 | ); |
| 289 | } |
| 290 | return null; |
| 291 | }; |
| 292 | |
| 293 | // ====================== Render ====================== |
| 294 | return ( |
no outgoing calls
no test coverage detected
searching dependent graphs…