-
Notifications
You must be signed in to change notification settings - Fork 2
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: input problem on appointment creation on safari #322
Conversation
@@ -138,7 +139,7 @@ const AppointmentForm: React.FC<FormProps> = ({ errors, appointmentsCount, onSet | |||
{/* DURATION */} | |||
<FormControl isInvalid={'duration' in errors} width={inputWidth}> | |||
<FormControl.Label>{t('appointment.create.durationLabel')}</FormControl.Label> | |||
<Select placeholder="Dauer der Unterrichtseinheit" onValueChange={(e) => handleDurationSelection(e)}> | |||
<Select placeholder="Dauer der Unterrichtseinheit" onValueChange={(duration: string) => handleDurationSelection(duration)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did this even work before? 😅
const Select = (props: any) => { | ||
const isSafari = () => /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); | ||
|
||
return <NBSelect {...props} selection={isSafari() ? 1 : null} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this hack come from? Could you add a comment, cause I do not understand how it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I found the same issue here: GeekyAnts/NativeBase#5111
And the solution therefore is: https://github.com/spr-networks/super/blob/main/frontend/src/components/Select.web.js
I honestly cant explain to you how it works... 😅
Revert "Merge pull request #322 from corona-school/fix/create-appoint…
Description
We had the problem, that only a single character is accepted on controlled input.
So it seems that the problem occures when a select element is present with an input on the same page.
refers to https://github.com/corona-school/project-user/issues/853
Solved