From 346f5f2595730a42a4ddf3668aefbbb6d742e674 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Tue, 11 Dec 2018 15:14:53 +0100 Subject: [PATCH] Using drop down instead --- .../core/components/Picker/SimplePicker.tsx | 4 +- public/app/plugins/panel/gauge/MappingRow.tsx | 42 ++++--------- .../panel/gauge/ValueMappings.test.tsx | 27 +++++--- .../__snapshots__/ValueMappings.test.tsx.snap | 61 +++++++++++++++++++ public/sass/components/_thresholds.scss | 3 +- 5 files changed, 98 insertions(+), 39 deletions(-) create mode 100644 public/app/plugins/panel/gauge/__snapshots__/ValueMappings.test.tsx.snap diff --git a/public/app/core/components/Picker/SimplePicker.tsx b/public/app/core/components/Picker/SimplePicker.tsx index 4d127b7d82f..b0251d61a69 100644 --- a/public/app/core/components/Picker/SimplePicker.tsx +++ b/public/app/core/components/Picker/SimplePicker.tsx @@ -11,7 +11,7 @@ interface Props { onSelected: (item: any) => {} | void; options: any[]; placeholder?: string; - width: number; + width?: number; value: any; } @@ -29,7 +29,7 @@ const SimplePicker: SFC = ({ return (