Carbon icon indicating copy to clipboard operation
Carbon copied to clipboard

Unexpected behaviour with section headers

Open pedrommcarrasco opened this issue 4 years ago • 1 comments

Checklist

Hey @ra1028 👋 First of all, congrats on such a great project! I've been playing with Carbon lately and I think I managed to find a nasty issue with UITableView section headers or maybe I'm doing something wrong 🤔

Expected Behavior

Show all section headers and allow self-sizing

Current Behavior

  • First section header is not displayed
  • Self-sizing doesn't seem to work

Detailed Description (Include Screenshots)

  • Expected (with standard UITableView code) Screenshot 2019-11-14 at 10 43 59

  • What I get with Carbon Screenshot 2019-11-14 at 10 43 57

Sample Project:

Test.zip

Environment

  • Carbon version: What's currently in master

  • Swift version: 5.1

  • iOS version: 13.2

  • Xcode version: 11.2

  • Devices/Simulators: iPhone 11 Pro

  • CocoaPods/Carthage version: Not applicable (Swift Package Manager)

pedrommcarrasco avatar Nov 14 '19 10:11 pedrommcarrasco

Hi @pedrommcarrasco, Thanks for your valuable reporting and sample project!

What I learned from your test app is that it works correctly when I set a value that is NOT UITableView.automaticDimension to estimatedSectionHeaderHeight. This will probably happen if component don't have a referenceSize at here. Fix it by returning a larger value if automaticSizing is set.

I'll fix this soon. Thanks!

ra1028 avatar Dec 09 '19 12:12 ra1028