mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #510] Core renderables should be easier to extend/override/shouldn't have private properties #133
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Quackzoer on GitHub (Jan 11, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/510
I wanted to create a small set of framework agnostic inputs with bindings to React. Right now I'm working on password renderable and I don't know if it's my code or if core renderables are really tough to work on. Keep in mind that this code had been heavily experimented on so it doesn't look great.
This causes onSubmit to run twice (first time with e.g
***, second withabc). From what I tested value is fortunately set only once but I don't see why I can't directly accessthis._value. I know it's a good practice to encapsulate class properties but it would be great to have some way to create new renderables based on existing core ones. Recently I was working on checkbox and handlingonChangealso needed some workarounds because react-reconciler has hardcoded values. Ultimately I just addedonChangein react wrapper:But it would be great I think if there were some rules like every renderable which has
valuewhen this value changes emitsonChangeevent and react reconciler will treat all renderables equally.Maybe it's me and I'm the one with wrong mindset or approach,, if so please let me know, in the meantime I will tryt my best to create these simple components and I will share them
@kommander commented on GitHub (Jan 12, 2026):
Hey, thanks for the feedback. @msmps is working on some framework agnostic UI components and hit some limits as well. I saw he had added a checkbox as well. Haven't seen the implementation yet, but I think he's about to publish these as well.
I agree, something like this should be straight forward to implement and if it isn't yet, I am open to improve the interfaces.
That said, for a component like this I would do the override only for rendering and let the rest behave the same, starting with something like this: