If you have a select input (not multi-select) and horizontally center the value, typing into the search field causes an infinite loop leading to a "Call stack size exceeded" error.
It would definitely be nice to support centering text in single-select mode, so this should be looked into. I suspect the issue is related to the input-autosize; maybe it's worth adding a prop that disabled use of that component if you don't need it.
:+1: any insight into why this happens? It's definitely related to the input-autosize, I'm seeing the same thing in my own autosized input (not using your library). I suspect it's something related to browser repainting?
Still having this error here... anyone?
I also ran into this.
One workaround I've found is to add custom style overrides to specify text-align on a per-element basis for the children of Select, instead of on the Select component itself:
.Select-placeholder,
.Select--single > .Select-control .Select-value
text-align: center
.Select-option
text-align: center
Still seeing this error with centered text.
flattenChildren.js?0d06:28 Uncaught RangeError: Maximum call stack size exceeded
for the record, there are several other centering strategies that work fine:
margin: autojustify-content: center
After copying react-select.css from node_modules into my local styles folder. I applied the above diff to prevent the error.
Version 1 of react-select is no longer supported.
In the best interest of the community we've decided to spend the time we have available on the latest version.
We apologise for any inconvenience.
Please see: