Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions maui/src/Accordion/AccordionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,6 @@ static void OnIsExpandedPropertyChanged(BindableObject bindable, object oldValue
// Content does not get collapsed when item is being collapsed in PCL view.
if (bindable is AccordionItem accordionItem)
{
if (accordionItem.Content != null && (bool)newValue && accordionItem.Content.IsVisible)
{
accordionItem.Content.IsVisible = true;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I struggle understanding why we are removing this 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bricefriha - This part of the code was not relevant to the current issue and has been removed, as it was unnecessary.

if (accordionItem._accordion != null && accordionItem._accordionItemView != null && accordionItem._accordionItemView.IsExpanded != accordionItem.IsExpanded)
{
accordionItem.OnIsExpandedChanging((bool)newValue);
Expand Down
10 changes: 5 additions & 5 deletions maui/src/Accordion/SfAccordion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ internal override Size LayoutMeasure(double widthConstraint, double heightConstr
/// <param name="newValue">The new value of expand mode property. </param>
static void OnExpandModePropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
if (bindable is SfAccordion accordion)
if (bindable is SfAccordion accordion && accordion.IsViewLoaded)
{
accordion.UpdateAccordionItemsBasedOnExpandModes(true);
}
Expand All @@ -1406,7 +1406,7 @@ static void OnExpandModePropertyChanged(BindableObject bindable, object oldValue
/// <param name="newValue">The new value of item spacing property. </param>
static void OnItemSpacingPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
if (bindable is SfAccordion accordion)
if (bindable is SfAccordion accordion && accordion.IsViewLoaded)
{
foreach (var item in accordion.Items)
{
Expand All @@ -1427,7 +1427,7 @@ static void OnItemSpacingPropertyChanged(BindableObject bindable, object oldValu
/// <param name="newValue">The new value of animation duration property. </param>
static void OnAnimationDurationPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
if (bindable is SfAccordion accordion)
if (bindable is SfAccordion accordion && accordion.IsViewLoaded)
{
foreach (AccordionItem item in accordion.Items)
{
Expand All @@ -1447,7 +1447,7 @@ static void OnAnimationDurationPropertyChanged(BindableObject bindable, object o
/// <param name="newValue">The new value of animation easing property. </param>
static void OnAnimationEasingPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
if (bindable is SfAccordion accordion)
if (bindable is SfAccordion accordion && accordion.IsViewLoaded)
{
foreach (AccordionItem item in accordion.Items)
{
Expand All @@ -1467,7 +1467,7 @@ static void OnAnimationEasingPropertyChanged(BindableObject bindable, object old
/// <param name="newValue">The new value of header icon position property. </param>
static void OnHeaderIconPositionPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
if (bindable is SfAccordion accordion)
if (bindable is SfAccordion accordion && accordion.IsViewLoaded)
{
foreach (AccordionItem item in accordion.Items)
{
Expand Down