[PR #85] [MERGED] fix(core): recalculate height #1058

Closed
opened 2026-03-14 09:16:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/85
Author: @msmps
Created: 8/26/2025
Status: Merged
Merged: 8/26/2025
Merged by: @msmps

Base: mainHead: fix/dynamic-text-height-20250826172815


📝 Commits (2)

  • 47526ea fix(core): recalculate height
  • ed88072 fix(core): resolve height issue

📊 Changes

1 file changed (+1 additions, -12 deletions)

View changed files

📝 packages/core/src/renderables/Text.ts (+1 -12)

📄 Description

Description

  • there's a user reported bug that found when multiline text was updated after initial render only the first line is displayed! investigations point me to the height not recalculating

Reproduction

import { render } from "@opentui/react"
import { useEffect, useState } from "react"

export const App = () => {
  const [output, setOutput] = useState("")

  useEffect(() => {
    setOutput(`First line
Second line
Third line
`)
  }, [])

  return <text>{output}</text>
}

void render(<App />)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/85 **Author:** [@msmps](https://github.com/msmps) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/26/2025 **Merged by:** [@msmps](https://github.com/msmps) **Base:** `main` ← **Head:** `fix/dynamic-text-height-20250826172815` --- ### 📝 Commits (2) - [`47526ea`](https://github.com/anomalyco/opentui/commit/47526eaef6f654bbf4cc7f801b5c9267e3f15418) fix(core): recalculate height - [`ed88072`](https://github.com/anomalyco/opentui/commit/ed8807234b21d580d1b7958377956575ab05f04a) fix(core): resolve height issue ### 📊 Changes **1 file changed** (+1 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/Text.ts` (+1 -12) </details> ### 📄 Description # Description - there's a user reported bug that found when multiline text was updated after initial render only the first line is displayed! investigations point me to the height not recalculating # Reproduction ```tsx import { render } from "@opentui/react" import { useEffect, useState } from "react" export const App = () => { const [output, setOutput] = useState("") useEffect(() => { setOutput(`First line Second line Third line `) }, []) return <text>{output}</text> } void render(<App />) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:16:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1058
No description provided.