Skip to content

Commit d5ac59b

Browse files
authored
[SearchPage][Android] Fix bug where ScrollableHeader were not added. (#820)
1 parent eda09e5 commit d5ac59b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [55.4.1]
2+
- [SearchPage][Android] Fix bug where `ScrollableHeader` were not added.
3+
14
## [55.4.0]
25
- [iOS][BottomSheet] Use native UINavigationBar for bottom sheet header with centered title, system close/back buttons, and proper blur behavior
36
- [Android][BottomSheet] Fixed edge-to-edge constraints not applying until scroll when start Positioning is Large

src/library/DIPS.Mobile.UI/Components/Searching/SearchPage.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public SearchPage()
5959
AutomationId = "ResultCollectionView".ToDUIAutomationId<SearchPage>(),
6060
HeaderTemplate = new DataTemplate(() => new Grid { Padding = new Thickness(0, Sizes.GetSize(SizeName.content_margin_large), 0, 0) })
6161
};
62+
63+
m_resultCollectionView.SetBinding(StructuredItemsView.HeaderProperty, static (SearchPage searchPage) => searchPage.BindingContext, source: this);
6264

6365
m_resultCollectionView.Scrolled += OnCollectionViewScrolled;
6466
m_resultCollectionView.SetBinding(ItemsView.ItemTemplateProperty, static (SearchPage searchPage) => searchPage.ResultItemTemplate, source: this);
@@ -258,7 +260,7 @@ private void OnSearchModeChanged()
258260

259261
private void OnScrollableHeaderChanged()
260262
{
261-
m_resultCollectionView.Header = ScrollableHeader;
263+
m_resultCollectionView.HeaderTemplate = new DataTemplate(() => ScrollableHeader);
262264
}
263265

264266
private void OnFooterViewChanged()

0 commit comments

Comments
 (0)