From e745e3332e27da4e67d952490206b0f2ef5c6a7e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 28 Jun 2019 16:00:16 +0300 Subject: [PATCH] Hide clear icon in autocomplete if autocomplete is disabled --- components/autocomplete/Autocomplete.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/autocomplete/Autocomplete.js b/components/autocomplete/Autocomplete.js index ed08d6fa..a0ad8ab5 100644 --- a/components/autocomplete/Autocomplete.js +++ b/components/autocomplete/Autocomplete.js @@ -389,7 +389,7 @@ const factory = (Chip, Input) => { const outerClassName = classnames(theme.autocomplete, { [theme.focus]: this.state.focus, }, className); - const withClear = allowClear && (multiple + const withClear = allowClear && !disabled && (multiple ? value && Object.keys(value).length > 0 : value != null); return ( diff --git a/package.json b/package.json index 3ed9fcf6..172137f6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "react-toolbox", "description": "A set of React components implementing Google's Material Design specification with the power of CSS Modules.", "homepage": "http://www.react-toolbox.io", - "version": "2.0.0-beta.23", + "version": "2.0.0-beta.24", "main": "./lib", "module": "./components", "author": {