alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Apply custom inputProps directly to the input component (Issue #156) #157

Closed darekkay closed 6 years ago

darekkay commented 6 years ago

Using inputProps it is possible to pass custom props like aria-describedby and override other props like aria-label. This makes extending the component really easy without any breaking changes.

darekkay commented 6 years ago

Unfortunately, it was not straightforward to get this project to run on Windows (even using Git Bash) :(

I've had many files regenerated (?), and I was not sure whether I should commit those. You should probably rerun the docs generation and see, if it works as expected (the new inputProps prop was properly listed in the docs). This might be caused by using Windows.

I've also run into problems because of using ^ and >= versions in package.json. The app crashed after a clean npm install (probable cause: react-dom version mismatch). I fixed the versions (removed ^ and >=), run npm install again and this solved the problem. It's a good practice to a) use fixed values and b) commit package-lock.json into the repository. This solves the problem of multiple users having different module versions installed. I did not include this in the PR, though, in case you don't agree with this practice.

alsoscotland commented 6 years ago

@darekkay Thanks for the work! I am traveling today. The build tools for this project as well as the coding styles need a lot of updating. Just have not had the bandwidth to do so. I appreciate you working with the constraints. At some point I plan to modernize it a bit.

I am traveling today but will take a thorough look at the PR as soon as I can

darekkay commented 6 years ago

Thanks for the quick response. I don't know why the version got escaped, I've fixed it.

Have a nice weekend!

alsoscotland commented 6 years ago

@darekkay thanks again. Released https://github.com/alsoscotland/react-super-select/tree/v1.0.18