From 51041f824c05f5293baa4c1c42df7bd657d3948a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Thu, 16 Feb 2017 15:37:42 +0100 Subject: [PATCH] Hide inline filters in absence of filter function The inline filters are now hidden when no `filter` property has been passed to the row directive, which is more consistent with the filters in the document details table. The context view relies on this behaviour to hide the filtering actions. Improving the `inlineFilter` to actually re-use the passed `filter` function will happen in a separate PR. --- src/ui/public/doc_table/components/table_row.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/public/doc_table/components/table_row.js b/src/ui/public/doc_table/components/table_row.js index 283e1660a1019..38b8d695e3099 100644 --- a/src/ui/public/doc_table/components/table_row.js +++ b/src/ui/public/doc_table/components/table_row.js @@ -107,7 +107,10 @@ module.directive('kbnTableRow', ['$compile', 'Private', function ($compile, Priv newHtmls.push(cellTemplate({ timefield: true, formatted: _displayField(row, indexPattern.timeFieldName), - filterable: mapping[indexPattern.timeFieldName].filterable, + filterable: ( + mapping[indexPattern.timeFieldName].filterable + && _.isFunction($scope.filter) + ), column: indexPattern.timeFieldName })); } @@ -115,7 +118,8 @@ module.directive('kbnTableRow', ['$compile', 'Private', function ($compile, Priv $scope.columns.forEach(function (column) { const isFilterable = $scope.flattenedRow[column] !== undefined && mapping[column] - && mapping[column].filterable; + && mapping[column].filterable + && _.isFunction($scope.filter); newHtmls.push(cellTemplate({ timefield: false,