Skip to content

Commit

Permalink
Update HtmlTableContent.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed Aug 12, 2021
1 parent a3f400e commit 94fae6b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Ajax/semantic/html/content/table/HtmlTableContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
*
*/
class HtmlTableContent extends HtmlSemCollection {
protected $_focusable=false;

protected $_focusable = false;

protected $_tdTagNames = [
"thead" => "th",
Expand Down Expand Up @@ -70,7 +71,7 @@ protected function createItem($value) {
$count = $this->count();
$tr = new HtmlTR("");
$tr->setContainer($this, $count);
if($this->_focusable) {
if ($this->_focusable) {
$tr->setProperty('tabindex', $count);
}
$tr->setTdTagName($this->_tdTagNames[$this->tagName]);
Expand Down Expand Up @@ -256,8 +257,12 @@ private function colAlign($colIndex, $function) {
$count = $this->count();
for ($i = 0; $i < $count; $i ++) {
$index = $this->content[$i]->getColPosition($colIndex);
if ($index !== NULL)
$this->getCell($i, $index)->$function();
if ($index !== NULL) {
$cell = $this->getCell($i, $index);
if ($cell != NULL) {
$cell->$function();
}
}
}
return $this;
}
Expand Down Expand Up @@ -487,6 +492,7 @@ public function _setMerged($value) {
}

/**
*
* @param bool $focusable
*/
public function setFocusable(bool $focusable): void {
Expand Down

0 comments on commit 94fae6b

Please sign in to comment.