(text: string, maxWidth: number)
| 60 | indexInFiltered: number; |
| 61 | }>; |
| 62 | function normalizeAndTruncateToWidth(text: string, maxWidth: number): string { |
| 63 | const normalized = text.replace(/\s+/g, ' ').trim(); |
| 64 | return truncateToWidth(normalized, maxWidth); |
| 65 | } |
| 66 | |
| 67 | // Width of prefixes that TreeSelect will add |
| 68 | const PARENT_PREFIX_WIDTH = 2; // '▼ ' or '▶ ' |
no test coverage detected