all repos — caroster @ b5a91f786b9ff0ad9520b9c90f950983fbc0f881

[Octree] Group carpool to your event https://caroster.io

feat(PassengersList): 💄 Prevent email field tab selection when it's hidden
Simon Mulquin simon@octree.ch
Wed, 19 Jan 2022 14:08:47 +0100
commit

b5a91f786b9ff0ad9520b9c90f950983fbc0f881

parent

7c999d08eda0b123210cd81bce649f1a93bae754

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M frontend/containers/PassengersList/Input.tsxfrontend/containers/PassengersList/Input.tsx

@@ -55,6 +55,7 @@ edge="end"

size="small" disabled={!name} onClick={onSave} + tabIndex={-1} > <Icon>check</Icon> </IconButton>

@@ -83,6 +84,8 @@ };

const useStyles = makeStyles(theme => ({ emailBox: { + //We need this to prevent the placeholder to unexpectedly show when the element is selected with tab key + visibility: ({showEmail}) => (showEmail ? 'visible' : 'hidden'), transition: 'all 0.3s ease', maxHeight: ({showEmail}) => (showEmail ? '6rem' : 0), overflow: 'hidden',