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

InputGroup rightElementWidth no longer gets recomputed if rightElement changes #3965

Closed
justinbhopper opened this issue Feb 14, 2020 · 0 comments · Fixed by #3973
Closed

Comments

@justinbhopper
Copy link
Contributor

justinbhopper commented Feb 14, 2020

Environment

  • Package version(s): @blueprintjs/core 3.23.1
  • Browser and OS versions: Windows

Steps to reproduce

  1. Create a InputGroup that has no rightElement on mount
  2. Update prop of InputGroup to include a rightElement

Actual behavior

The InputGroup does not resize to adjust its padding-right for the rightElement, which causes overlapping.

Expected behavior

The inputGroup recomputes its padding-right to reflect the new rightElement prop.

Possible solution

I believe this bug is caused by a change here, which seemed to be an attempt to fix some sort of infinite loop scenario. The fix ended up removing any re-calculation via componentDidUpdate, which means the right padding is effectively locked in after initial render. I think perhaps we should introduce the componentDidUpdate, but only recompute the rightElementWidth if the rightElement prop changed.

#3813
66b16dd

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

Successfully merging a pull request may close this issue.

1 participant