From e67f6ebf5cb90b88294feed5147b32d2a7091f64 Mon Sep 17 00:00:00 2001 From: Marcel Hallmann Date: Sat, 8 Oct 2016 20:01:12 +0200 Subject: [PATCH] #6537 add simple check to enable coloring in viz (data table), too --- src/ui/public/stringify/types/color.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/public/stringify/types/color.js b/src/ui/public/stringify/types/color.js index 774c581378045..871a520304fc5 100644 --- a/src/ui/public/stringify/types/color.js +++ b/src/ui/public/stringify/types/color.js @@ -45,7 +45,7 @@ export default function ColorFormatProvider(Private) { html(val, field) { var color; - if (field.type === 'string') { + if (field.type === 'string' || field === 'string') { color = _.findLast(this.param('colors'), (colorParam) => { return new RegExp(colorParam.regex).test(val); }); @@ -67,5 +67,6 @@ export default function ColorFormatProvider(Private) { } }; + return _Color; };