Bug 60434 - TableSection with no Title is rendered as an empty row in iOS 11, and not rendered in previous iOS versions
Summary: TableSection with no Title is rendered as an empty row in iOS 11, and not ren...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-30 10:54 UTC by ranson
Modified: 2017-11-14 01:09 UTC (History)
4 users (show)

Tags: ios11, tablesection, title, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Repro for the TableSection problem. (144.86 KB, application/x-zip-compressed)
2017-10-30 10:54 UTC, ranson
Details
Version infos (4.50 KB, text/plain)
2017-10-30 10:56 UTC, ranson
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60434 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description ranson 2017-10-30 10:54:45 UTC
Created attachment 25500 [details]
Repro for the TableSection problem.

On iOS 11, TableSection with no Title <TableSection/> is rendered as an empty row.

And on iOS 10.3 (and previous versions), the same TableSection is not rendered (no row generated). It is the expected behavior.

The "bug" is still there with the 2.5.0-pre2.

I attached a repro and the version infos.
Comment 1 ranson 2017-10-30 10:56:13 UTC
Created attachment 25501 [details]
Version infos
Comment 2 ranson 2017-11-02 16:36:24 UTC
I have found a workaround with a custom renderer:

    public class ExtendedTableViewRenderer : TableViewRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<TableView> e)
        {
            base.OnElementChanged(e);

            if (this.Control != null && e.NewElement != null)
            {
                this.Control.EstimatedSectionHeaderHeight = 0;
            }
        }
    }

In your TableViewModelRenderer.GetHeightForRow method, you should return 0 for TableSection with no Title instead of UITableView.AutomaticDimension, at least since iOS 11.