API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

It says the properties are:

  • #headers: Table headers used in the table.
  • #options: An associative array where each key is the value returned when a user selects the radio button or checkbox, and each value is the row of table data.

But actually the correct name for the first property is #header (singular).

CommentFileSizeAuthor
#6 2651610-5-fixing-wrong-property-name.patch659 bytesDeanRae

Comments

TR created an issue. See original summary.

tr’s picture

Issue summary: View changes
cmak’s picture

Assigned: Unassigned » cmak
jhodgdon’s picture

Issue tags: +Novice

Looked at the code -- agreed! Just need a quick patch. Thanks for the issue.

DeanRae’s picture

Assigned: cmak » DeanRae
Issue tags: +CatalystAcademy

Unassiging @cmak as its been close to a day since the last activity. Hoping to get my second patch for drupal :)

DeanRae’s picture

Assigned: DeanRae » Unassigned
Status: Active » Needs review
StatusFileSize
new659 bytes

Checked documentation to make sure that #headers was meant to be #header and fixed it in the patch.

tr’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Welcome, DeanRae!

jhodgdon’s picture

Thanks for the patch and review! +1 for RTBC from me too.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Can someone file a followup to improve the documentation to say what should be in #header.

Committed b5d8489 and pushed to 8.0.x. Thanks!

  • alexpott committed 1a5059c on 8.1.x
    Issue #2651610 by DeanRae, TR: Tableselect documentation lists wrong...

  • alexpott committed b5d8489 on
    Issue #2651610 by DeanRae, TR: Tableselect documentation lists wrong...
jhodgdon’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.