Skip to content

Commit

Permalink
explicitly set includeInLayout for itemrenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Mar 27, 2024
1 parent 2eb342d commit 3569bf4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions haxe/ui/containers/Box.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import haxe.ui.behaviours.DataBehaviour;
import haxe.ui.behaviours.DefaultBehaviour;
import haxe.ui.core.Component;
import haxe.ui.core.CompositeBuilder;
import haxe.ui.core.CompositeBuilder;
import haxe.ui.core.IDataComponent;
import haxe.ui.core.ItemRenderer;
import haxe.ui.data.ArrayDataSource;
Expand All @@ -13,7 +14,6 @@ import haxe.ui.layouts.DefaultLayout;
import haxe.ui.layouts.LayoutFactory;
import haxe.ui.styles.Style;
import haxe.ui.util.Variant;
import haxe.ui.core.CompositeBuilder;

/**
Base `Layout` that allows a container to specify an `icon`. How that icon resource is used depends on subclasses, like `TabView`
Expand Down Expand Up @@ -135,6 +135,7 @@ private class Builder extends CompositeBuilder {
}

_box.itemRenderer = itemRenderer;
_box.itemRenderer.includeInLayout = false;
_box.itemRenderer.ready();
_box.itemRenderer.handleVisibility(false);
}
Expand All @@ -151,7 +152,9 @@ private class Builder extends CompositeBuilder {
}

for (child in _component.findComponents(ItemRenderer)) {
if (child == _box.itemRenderer) continue;
if (child == _box.itemRenderer) {
continue;
}
if (dataSource.indexOf(child.data) == -1) {
_box.removeComponent(child);
}
Expand Down

0 comments on commit 3569bf4

Please sign in to comment.