forked from reya/gpui-native-kit
Fix shared element state across component instances
This commit is contained in:
@@ -1016,7 +1016,7 @@ fn render_pane(
|
||||
move |_, _| {
|
||||
tabs.iter()
|
||||
.map(|tab| {
|
||||
let mut entry = Tab::new(tab.title.clone());
|
||||
let mut entry = Tab::new(tab.panel.clone(), tab.title.clone());
|
||||
if let Some(role) = tab.icon {
|
||||
entry = entry.icon(role);
|
||||
}
|
||||
|
||||
@@ -255,6 +255,14 @@ impl RenderOnce for ResizeHandle {
|
||||
return;
|
||||
}
|
||||
|
||||
if event.pressed_button != Some(MouseButton::Left) {
|
||||
drag.update(cx, |drag, cx| {
|
||||
drag.dragging = false;
|
||||
cx.notify();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let delta = match axis {
|
||||
Axis::Horizontal => event.position.x - last.x,
|
||||
Axis::Vertical => event.position.y - last.y,
|
||||
|
||||
Reference in New Issue
Block a user