the video explains it pretty well
Each pane should have its own data which they seem to. However how I create the pane grid seems to be the problem, I create the same widget for all exists of a pane grid.
pub fn pane_grid<'a>(
panes: &'a Panes,
tabs: &'a [DefaultKey],
map: &SlotMap<DefaultKey, Tab>,
) -> PaneGrid<'a, Message, Renderer> {
PaneGrid::new(&panes.data, |pane, state, _is_maximized| {
let is_focused = panes.active == pane;
Content::new(match state.tab {
Tab::File(_) => tab_bar(state.active_tab, &tabs, map),
})
.style(Container::PaneGridContent(is_focused))
.title_bar(
TitleBar::new(title_bar(pane, state)).style(Container::PaneGridTitleBar(is_focused)),
)
})
.on_click(Message::PaneClicked)
.on_drag(Message::PaneDragged)
.on_resize(10, Message::PaneResized)
}
It seems like I would need a for loop for creating the widgets for each panel, but I’m not sure where that would go. Because how the code is structured it looks like i can only edit/create widgets on one pane at a time?