Skip to content

Commit

Permalink
Temporary solution for pseudo header values
Browse files Browse the repository at this point in the history
  • Loading branch information
JPustkuchen committed Jul 2, 2021
1 parent 4148793 commit ba419bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Elements/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public function removeHeaderlessColumns(): Table {
*/
public function hideHeaderlessColumns($class = 'hidden'): Table {
$cellKeys = $this->header->getCellKeys();
$removedColumns = [];
if (!empty($this->rows) && !empty($cellKeys)) {
foreach ($this->rows as $row) {
$cells = $row->getCells();
Expand Down
4 changes: 4 additions & 0 deletions src/Elements/TableRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public static function createFromArray(array $cellsArray) {
if (!is_array($cell)) {
// No array, use value as value:
$cells[] = new TableCell($key, $cell);
// TODO - Dirty workarund to hide empty (null) values and headers
if($cell === null){
$cell->addClass('hidden');
}
} else {
// Array value, use by keys:
$value = $cell['#value'];
Expand Down

0 comments on commit ba419bf

Please sign in to comment.