limbo-works/Limbo.Umbraco.Tables

col.Scope returns row or col not th like document suggests

Eaglef90 opened this issue · 1 comments

Looking at the code snippet it says if you check col.Scope== "th" that will indicate if first row is a header row. Looking at the intellisense inside VS it says that code.Scope will return "col" or "row". Printing out col.Scope when I have the option " Use first row as header" checked I can see that code.Scope == "col". I think the documentation needs to be updated?

Hi @Eaglef90

Yes, the example is a bit incorrect. The value of the Scope property may be either row, col or null. I've updated the example to reflect this.

You may also use the Type property instead, as the value can be either th or td. The value is th when Scope has a value, or td if Scope is null.

One could argue that both properties should be converted to enums, which should make these checks a bit more simple. But that would be a breaking change - so if that's the way we're going, it will likely be for a future 1.1 release.