-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Typing issue with FormControl onChange #2781
Comments
This seems like a TS type def issue. The event in the change handler is the unmodified React SyntheticEvent object not anything specific to react bootstrap |
The main problem is that I have come to two solutions to deal with this react typing deficiency, either aggregate sub element events within the component (using a
The first option is probably the best option, but if you want to inline without upcasting to |
@patsissons Still having problems when I try the second approach:
My render looks like this:
|
Is anyone looking at this now that type definitions are part of react-bootstrap? |
…t-bootstrap#3583, react-bootstrap#3568, react-bootstrap#2781) - Added tests to simple.test.tsx
…react-bootstrap#3568,react-bootstrap#2781) - Added tests to simple.test.tsx
…react-bootstrap#3568,react-bootstrap#2781) - Added tests to simple.test.tsx
Try it
|
When using React Bootstrap's time picker, I've noticed that in Chrome, a clock icon pops open next to the input box, allowing for time selection. However, in Firefox, this functionality seems to be missing. Why does this inconsistency occur between browsers?
|
I'm not quite sure if this issue belongs here or on the Definitely Typed repository, but I'll try here first.
When using the FormControl in React with typescript I am forced to cast the
currentTarget
toany
in the event handler in order to access the value of the FormControl. This gives me linter error and just seems wrong.Either the FormControl should have a value property that can be accessed through the currentTarget or there should be an entierly new event that just passes me back the value string. The later would follow the react methodology more closely.
Here is an example of the code with the offending cast.
The text was updated successfully, but these errors were encountered: