Skip to content
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

EuiComboBox: Set react-input-autosize styles once CSS loads #599

Closed
cjcenizal opened this issue Mar 30, 2018 · 2 comments
Closed

EuiComboBox: Set react-input-autosize styles once CSS loads #599

cjcenizal opened this issue Mar 30, 2018 · 2 comments

Comments

@cjcenizal
Copy link
Contributor

Per #567 (comment):

There's a TODO in combo_box.js which notes that we need to wait for the EUI CSS to be loaded before calling this.autoSizeInput.copyInputStyles() (docs). Ideally we should listen for the styles to load instead of using a static timeout. Until we fix this, users are bound to see the input text with the incorrect font-size and style.

@anishagg17
Copy link
Contributor

@snide would it be fixed by using react-loadable ??

@chandlerprall
Copy link
Contributor

react-loadable would not address as we currently rely on the downstream application to EUI's styles, we would need to poll the DOM in some fashion, likely checking a known-to-exist DOM node in checkbox for an EUI style. There isn't a programmatic way to hook react-loadable into this

As we move away from applying styles in this way, and toward some kind of CSS-in-JS solution, this issue goes away entirely. I've never witnessed the issue this potentially causes, and haven't heard of it from anyone else, so I am going to close this. If someone has a demonstrataable case I'm happy to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants