Skip to content

Commit

Permalink
fix(combobox): [WASM] Reduce number of items created by ComboBox
Browse files Browse the repository at this point in the history
Reduce cache size to a more reasonable value, so that dropdown takes less time to open.
  • Loading branch information
davidjohnoliver committed Feb 2, 2021
1 parent 664aaf6 commit 1b23964
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public partial class CarouselPanel : VirtualizingPanel
public CarouselPanel()
{
_layout.Initialize(this);

// Set CacheLength small to somewhat resemble the UWP CarouselPanel. Note that CarouselPanel doesn't expose a configurable
// CacheLength - Uno's CarouselPanel is borrowing the ItemsStackPanel virtualization strategy.
_layout.CacheLength = 0.5;
}

protected override Size MeasureOverride(Size availableSize) => _layout.MeasureOverride(availableSize);
Expand Down

0 comments on commit 1b23964

Please sign in to comment.