-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why doesn't TextArea
implement Widget
trait
#78
Comments
because |
I noticed that impl<'a> Widget for &'a TextArea<'a> {
// ...
}
// Usage
term.draw(|f| {
f.render_widget(&textarea, f.size());
})?; |
Yeah that's basically what I did for a vim input widget I'm making. Seems to work fine. |
@fmorroni Thanks for clarification. I'll consider this. |
This was included in v0.5.3 release. |
Great thanks! |
@rhysd did this break again recently?: error[E0277]: the trait bound `&tui_textarea::textarea::TextArea<'_>: Widget` is not satisfied
--> src/main.rs:72:30
|
72 | frame.render_widget(&self.state.text_area, area);
| ------------- ^^^^^^^^^^^^^^^^^^^^ the trait `widgets::WidgetRef` is not implemented for `&tui_textarea::textarea::TextArea<'_>`, which is required by `&tui_textarea::textarea::TextArea<'_>: Widget`
| |
| required by a bound introduced by this call |
@evbo This issue is a feature request and already closed. Could you create new one? |
Hi, why doesn't
TextArea
implement theWidget
trait? I know we have thewidget()
method but that seems kind of unnecessary to me. Is there an advantage to having it that way?The text was updated successfully, but these errors were encountered: