Revert "virtual_list: Fix VirtualList to limit only allow 1 direction scrollable." (#1387)
Reverts longbridge/gpui-component#1386
This commit is contained in:
parent
4341cf81d3
commit
2a9bc2a2f8
1 changed files with 6 additions and 9 deletions
|
|
@ -18,11 +18,11 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use gpui::{
|
use gpui::{
|
||||||
div, point, prelude::FluentBuilder as _, px, size, Along, AnyElement, App, AvailableSpace,
|
div, point, px, size, Along, AnyElement, App, AvailableSpace, Axis, Bounds, ContentMask,
|
||||||
Axis, Bounds, ContentMask, Context, DeferredScrollToItem, Div, Element, ElementId, Entity,
|
Context, DeferredScrollToItem, Div, Element, ElementId, Entity, GlobalElementId, Half, Hitbox,
|
||||||
GlobalElementId, Half, Hitbox, InteractiveElement, IntoElement, IsZero as _,
|
InteractiveElement, IntoElement, IsZero as _, ListSizingBehavior, Pixels, Point, Render,
|
||||||
ListSizingBehavior, Pixels, Point, Render, ScrollHandle, ScrollStrategy, Size, Stateful,
|
ScrollHandle, ScrollStrategy, Size, Stateful, StatefulInteractiveElement, StyleRefinement,
|
||||||
StatefulInteractiveElement, StyleRefinement, Styled, Window,
|
Styled, Window,
|
||||||
};
|
};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
||||||
|
|
@ -181,10 +181,7 @@ where
|
||||||
base: div()
|
base: div()
|
||||||
.id(id)
|
.id(id)
|
||||||
.size_full()
|
.size_full()
|
||||||
.map(|this| match axis {
|
.overflow_scroll()
|
||||||
Axis::Horizontal => this.overflow_x_scroll().overflow_y_hidden(),
|
|
||||||
Axis::Vertical => this.overflow_y_scroll().overflow_x_hidden(),
|
|
||||||
})
|
|
||||||
.track_scroll(&scroll_handle),
|
.track_scroll(&scroll_handle),
|
||||||
scroll_handle,
|
scroll_handle,
|
||||||
items_count: item_sizes.len(),
|
items_count: item_sizes.len(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue