Skip to content
Merged
Changes from all commits
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
7 changes: 2 additions & 5 deletions src/ui/public/doc_table/components/table_row.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import noWhiteSpace from 'ui/utils/no_white_space';
import openRowHtml from 'ui/doc_table/components/table_row/open.html';
import detailsHtml from 'ui/doc_table/components/table_row/details.html';
import uiModules from 'ui/modules';
import FilterManagerProvider from 'ui/filter_manager';
const module = uiModules.get('app/discover');


Expand All @@ -25,10 +24,9 @@ const MIN_LINE_LENGTH = 20;
* <tr ng-repeat="row in rows" kbn-table-row="row"></tr>
* ```
*/
module.directive('kbnTableRow', ['$compile', 'Private', function ($compile, Private) {
module.directive('kbnTableRow', ['$compile', function ($compile) {
const cellTemplate = _.template(noWhiteSpace(require('ui/doc_table/components/table_row/cell.html')));
const truncateByHeightTemplate = _.template(noWhiteSpace(require('ui/partials/truncate_by_height.html')));
const filterManager = Private(FilterManagerProvider);

return {
restrict: 'A',
Expand Down Expand Up @@ -88,8 +86,7 @@ module.directive('kbnTableRow', ['$compile', 'Private', function ($compile, Priv
$scope.inlineFilter = function inlineFilter($event, type) {
const column = $($event.target).data().column;
const field = $scope.indexPattern.fields.byName[column];
$scope.indexPattern.popularizeField(field, 1);
filterManager.add(field, $scope.flattenedRow[column], type, $scope.indexPattern.id);
$scope.filter(field, $scope.flattenedRow[column], type);
};

// create a tr element that lists the value for each *column*
Expand Down