Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Table] Remove extra column in split mode #83193

Merged
merged 5 commits into from
Nov 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,15 @@ export function KbnAggTable(config, RecursionHelper) {

if (typeof $scope.dimensions === 'undefined') return;

const { buckets, metrics, splitColumn, splitRow } = $scope.dimensions;
const { buckets, metrics, splitRow } = $scope.dimensions;

$scope.formattedColumns = table.columns
.map(function (col, i) {
const isBucket = buckets.find((bucket) => bucket.accessor === i);
const isSplitColumn = splitColumn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I didn't find any cases why this code needed.

? splitColumn.find((splitColumn) => splitColumn.accessor === i)
: undefined;
const isSplitRow = splitRow
? splitRow.find((splitRow) => splitRow.accessor === i)
: undefined;
const dimension =
isBucket || isSplitColumn || metrics.find((metric) => metric.accessor === i);
const dimension = isBucket || metrics.find((metric) => metric.accessor === i);

const formatter = dimension
? getFormatService().deserialize(dimension.format)
Expand Down