From dab87ca281fc2f3f21d76f1d707fc2f1bb49b805 Mon Sep 17 00:00:00 2001 From: Boyko Date: Sat, 26 Oct 2019 20:50:22 +0300 Subject: [PATCH] split autocomplete dropdown in to groups (#6211) * split autocomplete dropdown in to groups Signed-off-by: blalov * fix autocomplete flickering Signed-off-by: blalov * fix expression input issue. Signed-off-by: blalov * select autocomplete item issue fix Signed-off-by: blalov * remove metric group abstraction Signed-off-by: blalov --- web/ui/react-app/src/App.css | 9 +- web/ui/react-app/src/Checkbox.tsx | 23 ++--- web/ui/react-app/src/ExpressionInput.tsx | 97 ++++++++++--------- web/ui/react-app/src/Panel.tsx | 31 +++--- web/ui/react-app/src/PanelList.tsx | 42 ++++---- .../src/components/SanitizeHTML/index.tsx | 27 ++---- 6 files changed, 117 insertions(+), 112 deletions(-) diff --git a/web/ui/react-app/src/App.css b/web/ui/react-app/src/App.css index da6288a71c..e5f1d08b29 100644 --- a/web/ui/react-app/src/App.css +++ b/web/ui/react-app/src/App.css @@ -75,7 +75,6 @@ button.execute-btn { top: 100%; left: 56px; float: left; - padding: .5rem 1px .5rem 1px; margin: -5px; list-style: none; } @@ -90,6 +89,14 @@ button.execute-btn { display: block; } +.autosuggest-dropdown .card-header { + background: rgba(240, 230, 140, 0.4); + height: 30px; + display: flex; + align-items: center; + text-transform: uppercase; +} + .graph-controls, .table-controls { margin-bottom: 10px; } diff --git a/web/ui/react-app/src/Checkbox.tsx b/web/ui/react-app/src/Checkbox.tsx index 1d4719e353..247416baa7 100644 --- a/web/ui/react-app/src/Checkbox.tsx +++ b/web/ui/react-app/src/Checkbox.tsx @@ -1,18 +1,15 @@ -import React, { FC, HTMLProps, memo } from 'react'; -import { FormGroup, Label, Input } from 'reactstrap'; -import { uuidGen } from './utils/func'; +import React, { FC, memo, CSSProperties } from 'react'; +import { FormGroup, Label, Input, InputProps } from 'reactstrap'; -const Checkbox: FC> = ({ children, onChange, style }) => { - const id = uuidGen(); +interface CheckboxProps extends InputProps { + wrapperStyles?: CSSProperties; +} + +const Checkbox: FC = ({ children, wrapperStyles, id, ...rest }) => { return ( - - -