()
| 406 | // Check if text is truncated for each tab |
| 407 | useEffect(() => { |
| 408 | const checkTruncation = () => { |
| 409 | const newTruncated = new Set<string>() |
| 410 | textRefs.current.forEach((el, terminalId) => { |
| 411 | if (el && el.scrollWidth > el.clientWidth) { |
| 412 | newTruncated.add(terminalId) |
| 413 | } |
| 414 | }) |
| 415 | setTruncatedTabs(newTruncated) |
| 416 | } |
| 417 | |
| 418 | checkTruncation() |
| 419 |