From 9c93d562d75f4ff73abea86330369ec72a384586 Mon Sep 17 00:00:00 2001 From: Michel Santos Date: Tue, 12 Sep 2023 15:07:29 -0300 Subject: [PATCH] test: adicionando logica de disable explicita --- package.json | 2 +- source/components/select/select-component.js | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 4a438d98..f45c6fda 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@b2wads/grimorio-ui", "sideEffects": false, - "version": "10.1.12-beta", + "version": "10.1.13-beta", "description": "UI just like magic", "main": "lib/index.js", "repository": "https://github.com/b2wads/grimorio-ui", diff --git a/source/components/select/select-component.js b/source/components/select/select-component.js index 922b474d..dfa6d624 100644 --- a/source/components/select/select-component.js +++ b/source/components/select/select-component.js @@ -157,12 +157,19 @@ class Select extends Component { toggleOptions() { const { disabled } = this.props; this.list && (this.list.scrollTop = 0); - return () => - !disabled && - this.setState({ - activeLabel: true, - menuOpen: true, - }); + if (disabled === false) { + return () => + this.setState({ + activeLabel: true, + menuOpen: true, + }); + } else { + return () => + this.setState({ + activeLabel: false, + menuOpen: false, + }); + } } getChildren() {