feat(PassengersList): 💄 Prevent email field tab selection when it's hidden
Simon Mulquin simon@octree.ch
Wed, 19 Jan 2022 14:08:47 +0100
1 files changed,
3 insertions(+),
0 deletions(-)
M
frontend/containers/PassengersList/Input.tsx
→
frontend/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',