Open kxxt opened 6 months ago
I'm open to the idea. Do you any ideas about what the the API would look like if you implemented this?
I'm open to the idea. Do you any ideas about what the the API would look like if you implemented this?
I think the most obvious way is to create another type StatefulPopup
but that will introduce lots of duplicated code which is not ideal (though we could avoid probably most of the duplication by using macros).
A similar gap was mentioned in https://discord.com/channels/1070692720437383208/1072907135664529508/1237425024969871420
I think the most obvious way is to create another type
StatefulPopup
but that will introduce lots of duplicated code which is not ideal (though we could avoid probably most of the duplication by using macros).
I have a preference for this to be a single widget rather than two if it makes sense. The trait implementations are after all just traits Perhaps this is not possible however.
Moving this issue to tui-widgets repo
I want to render a stateful widget(The built-in widget list). But it appears that I can't pass the state through tui-popup.
Would it be possible to design an API to allow state to be passed through tui-popup to a inner stateful widget? Or should we change the API to make popup work more like a
Block
so that users could manually render whatever they want inside it?