1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +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);
$device_visibility = array_values($this->deviceVisibility);
$headers = $this->headers;
$short_headers = $this->shortHeaders;
$sort_values = $this->sortValues;
@ -235,12 +236,16 @@ final class AphrontTableView extends AphrontView {
if ($data) {
$row_num = 0;
foreach ($data as $row) {
$row_size = count($row);
while (count($row) > count($col_classes)) {
$col_classes[] = null;
}
while (count($row) > count($visibility)) {
$visibility[] = true;
}
while (count($row) > count($device_visibility)) {
$device_visibility[] = true;
}
$tr = array();
// NOTE: Use of a separate column counter is to allow this to work
// correctly if the row data has string or non-sequential keys.