Skip to content

Commit

Permalink
test: adicionando logica de disable explicita
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikeofic committed Sep 12, 2023
1 parent fa4398d commit 9c93d56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
19 changes: 13 additions & 6 deletions source/components/select/select-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 9c93d56

Please sign in to comment.