You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently TabViews are mainly oriented towards static bindings and content, making it difficult to interface between tabs and the broader program, and vice versa.
What I'd like to see is
A clear way to create bindings into data contained within a tab, such as for example .thenSelected(Tab::some_data) and .thenSelectedIndex(Tab::some_data, Index).
Some way to direct Events to the currently selected tab within a tabview.
An integrated way to determine which tab in a TabView is currently open.
Some of this is possible to do with the .on_select() callback together with .with_selected(), though it isn't an ideal solution. For example, using the .on_select() callback to set a separate index variable instead of querying the TabView's own selected_index.
The text was updated successfully, but these errors were encountered:
I'm not sure I understand what you mean by your first point. What do you mean by data contained within a tab? Typically your data should be in a model, probably further up the tree than the tabview.
Yes it's true that on_select and with_selected moves the managements of the tab index to your own data, but this is intentional as it gives you full control of the selected tab without needing messy events to sync with the internal tabview index.
If you could provide an example scenario of what you're trying to achieve I think that would help me understand what features you need me to add.
Currently
TabView
s are mainly oriented towards static bindings and content, making it difficult to interface between tabs and the broader program, and vice versa.What I'd like to see is
.thenSelected(Tab::some_data)
and.thenSelectedIndex(Tab::some_data, Index)
.Event
s to the currently selected tab within a tabview.TabView
is currently open.Some of this is possible to do with the
.on_select()
callback together with.with_selected()
, though it isn't an ideal solution. For example, using the.on_select()
callback to set a separate index variable instead of querying theTabView
's ownselected_index
.The text was updated successfully, but these errors were encountered: