Skip to content

Commit

Permalink
Fixed: Unable to close indexer category select input on mobile
Browse files Browse the repository at this point in the history
(cherry picked from commit e42d1af)
  • Loading branch information
markus101 authored and Qstick committed Feb 14, 2021
1 parent 94df76b commit 33cd9f5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
18 changes: 18 additions & 0 deletions frontend/src/Components/Form/EnhancedSelectInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,21 @@
display: inline-block;
margin: 5px -5px 5px 0;
}

.mobileCloseButtonContainer {
display: flex;
justify-content: flex-end;
height: 40px;
border-bottom: 1px solid $borderColor;
}

.mobileCloseButton {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;

&:hover {
color: $modalCloseButtonHoverColor;
}
}
12 changes: 12 additions & 0 deletions frontend/src/Components/Form/EnhancedSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,18 @@ class EnhancedSelectInput extends Component {
scrollDirection={scrollDirections.NONE}
>
<Scroller className={styles.optionsModalScroller}>
<div className={styles.mobileCloseButtonContainer}>
<Link
className={styles.mobileCloseButton}
onPress={this.onOptionsModalClose}
>
<Icon
name={icons.CLOSE}
size={18}
/>
</Link>
</div>

{
values.map((v, index) => {
const hasParent = v.parentKey !== undefined;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/Components/Form/EnhancedSelectInputOption.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@
&:last-child {
border: none;
}

&:hover {
background-color: unset;
}
}
4 changes: 3 additions & 1 deletion frontend/src/Components/Form/EnhancedSelectInputOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class EnhancedSelectInputOption extends Component {
//
// Listeners

onPress = () => {
onPress = (e) => {
e.preventDefault();

const {
id,
onSelect
Expand Down

0 comments on commit 33cd9f5

Please sign in to comment.