Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clickable areas #281

Merged
merged 5 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add navigator - #267 by @dominik-zeglen
- Fix voucher limit - #271 by @dominik-zeglen
- Allow multiple images to be uploaded - #277 by @dominik-zeglen
- Fix dropdown clickable areas - #281 by @dominik-zeglen

## 2.0.0

Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const useStyles = makeStyles(
padding: 8
},
hide: {
opacity: 0
opacity: 0,
zIndex: -1
},
hr: {
margin: theme.spacing(1, 0)
Expand Down Expand Up @@ -275,17 +276,19 @@ const MultiAutocompleteSelectFieldContent: React.FC<
</MenuItem>
)}
</div>
<div className={classes.arrowContainer}>
<div
className={classNames(classes.arrowInnerContainer, {
// Needs to be explicitely compared to false because
// scrolledToBottom can be either true, false or undefined
[classes.hide]: scrolledToBottom !== false
})}
>
<SVG src={chevronDown} />
{choices.length > maxMenuItems && (
<div className={classes.arrowContainer}>
<div
className={classNames(classes.arrowInnerContainer, {
// Needs to be explicitely compared to false because
// scrolledToBottom can be either true, false or undefined
[classes.hide]: scrolledToBottom !== false
})}
>
<SVG src={chevronDown} />
</div>
</div>
</div>
)}
</Paper>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const useStyles = makeStyles(
padding: 8
},
hide: {
opacity: 0
opacity: 0,
zIndex: -1
},
hr: {
margin: theme.spacing(1, 0)
Expand Down Expand Up @@ -228,17 +229,19 @@ const SingleAutocompleteSelectFieldContent: React.FC<
</MenuItem>
)}
</div>
<div className={classes.arrowContainer}>
<div
className={classNames(classes.arrowInnerContainer, {
// Needs to be explicitely compared to false because
// scrolledToBottom can be either true, false or undefined
[classes.hide]: scrolledToBottom !== false
})}
>
<SVG src={chevronDown} />
{choices.length > maxMenuItems && (
<div className={classes.arrowContainer}>
<div
className={classNames(classes.arrowInnerContainer, {
// Needs to be explicitely compared to false because
// scrolledToBottom can be either true, false or undefined
[classes.hide]: scrolledToBottom !== false
})}
>
<SVG src={chevronDown} />
</div>
</div>
</div>
)}
</Paper>
);
};
Expand Down
22 changes: 0 additions & 22 deletions src/storybook/__snapshots__/Stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3051,17 +3051,6 @@ exports[`Storyshots Generics / Multiple select with autocomplete no data 1`] = `
</span>
</div>
</div>
<div
class="MultiAutocompleteSelectFieldContent-arrowContainer-id"
>
<div
class="MultiAutocompleteSelectFieldContent-arrowInnerContainer-id MultiAutocompleteSelectFieldContent-hide-id"
>
<span
class="isvg pending"
/>
</div>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -4980,17 +4969,6 @@ exports[`Storyshots Generics / Select with autocomplete no data 1`] = `
No results found
</div>
</div>
<div
class="SingleAutocompleteSelectFieldContent-arrowContainer-id"
>
<div
class="SingleAutocompleteSelectFieldContent-arrowInnerContainer-id SingleAutocompleteSelectFieldContent-hide-id"
>
<span
class="isvg pending"
/>
</div>
</div>
</div>
</div>
</div>
Expand Down