1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 09:20:58 +01:00

Fix conduit result tables on mobile views

Summary: Fixes T8139. These tables don't `setHeaders()`, so we don't correctly default columns to be visible on devices.

Test Plan: Conduit results now visible on devices.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8139

Differential Revision: https://secure.phabricator.com/D12784
This commit is contained in:
epriestley 2015-05-09 10:05:21 -07:00
parent 99b4941c9a
commit 7668d47e6d

View file

@ -124,6 +124,7 @@ final class AphrontTableView extends AphrontView {
$visibility = array_values($this->columnVisibility); $visibility = array_values($this->columnVisibility);
$device_visibility = array_values($this->deviceVisibility); $device_visibility = array_values($this->deviceVisibility);
$headers = $this->headers; $headers = $this->headers;
$short_headers = $this->shortHeaders; $short_headers = $this->shortHeaders;
$sort_values = $this->sortValues; $sort_values = $this->sortValues;
@ -235,12 +236,16 @@ final class AphrontTableView extends AphrontView {
if ($data) { if ($data) {
$row_num = 0; $row_num = 0;
foreach ($data as $row) { foreach ($data as $row) {
$row_size = count($row);
while (count($row) > count($col_classes)) { while (count($row) > count($col_classes)) {
$col_classes[] = null; $col_classes[] = null;
} }
while (count($row) > count($visibility)) { while (count($row) > count($visibility)) {
$visibility[] = true; $visibility[] = true;
} }
while (count($row) > count($device_visibility)) {
$device_visibility[] = true;
}
$tr = array(); $tr = array();
// NOTE: Use of a separate column counter is to allow this to work // NOTE: Use of a separate column counter is to allow this to work
// correctly if the row data has string or non-sequential keys. // correctly if the row data has string or non-sequential keys.