diff --git a/public/app/core/components/Form/Input.tsx b/public/app/core/components/Form/Input.tsx index 83a77fdb38c..7940f3b1104 100644 --- a/public/app/core/components/Form/Input.tsx +++ b/public/app/core/components/Form/Input.tsx @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react'; +import classNames from 'classnames'; import { ValidationEvents, ValidationRule } from 'app/types'; import { validate, hasValidationEvent } from 'app/core/utils/validate'; @@ -80,7 +81,7 @@ export class Input extends PureComponent { render() { const { validationEvents, className, hideErrorMessage, ...restProps } = this.props; const { error } = this.state; - const inputClassName = 'gf-form-input' + (this.isInvalid ? ' invalid' : '') + ' ' + className; + const inputClassName = classNames('gf-form-input', { invalid: this.isInvalid }, className); const inputElementProps = this.populateEventPropsWithStatus(restProps, validationEvents); return ( diff --git a/public/app/core/components/Picker/Unit/UnitPicker.tsx b/public/app/core/components/Picker/Unit/UnitPicker.tsx index 5d09a82d846..f5c76e43fe4 100644 --- a/public/app/core/components/Picker/Unit/UnitPicker.tsx +++ b/public/app/core/components/Picker/Unit/UnitPicker.tsx @@ -36,25 +36,25 @@ export default class UnitPicker extends PureComponent { }; }); - const styles = { - ...ResetStyles, - menu: () => ({ - maxHeight: '75%', - overflow: 'scroll', - }), - menuList: () => - ({ - overflowY: 'auto', - position: 'relative', - } as React.CSSProperties), - valueContainer: () => - ({ - overflow: 'hidden', - textOverflow: 'ellipsis', - maxWidth: '90px', - whiteSpace: 'nowrap', - } as React.CSSProperties), - }; + // const styles = { + // ...ResetStyles, + // menu: () => ({ + // maxHeight: '75%', + // overflow: 'scroll', + // }), + // menuList: () => + // ({ + // overflowY: 'auto', + // position: 'relative', + // } as React.CSSProperties), + // valueContainer: () => + // ({ + // overflow: 'hidden', + // textOverflow: 'ellipsis', + // maxWidth: '90px', + // whiteSpace: 'nowrap', + // } as React.CSSProperties), + // }; const value = groupOptions.map(group => { return group.options.find(option => option.value === defaultValue); @@ -74,7 +74,7 @@ export default class UnitPicker extends PureComponent { Group: UnitGroup, Option: UnitOption, }} - styles={styles} + styles={ResetStyles} /> ); }