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

Fix input width in MultiSelect UI components - replacement solution #2714

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

mikiher
Copy link
Contributor

@mikiher mikiher commented Mar 6, 2024

This a a replacement of #2701 (which doesn't fully work), and now it really fixes #2700.

In this solution:

  • We remove the style property from the input element in the template altogether, replacing it with a w-6 tailwind class (which translates to width: 24px).
  • This change (for some reason not obvious to me) enables setInputWidth to work again, so we bring it back.
  • Now we just need to reset the width back to 24px after we're done editting.

I chose to use 24px instead of the original 40px because this is the calculated width of an empty input in setInputWidth

This now works well, fixes the issues that #2701 had.

@mikiher mikiher marked this pull request as ready for review March 6, 2024 12:26
@advplyr
Copy link
Owner

advplyr commented Mar 8, 2024

This is working for all my tests, thanks!

@advplyr advplyr merged commit 0d9d2fa into advplyr:master Mar 8, 2024
1 check passed
@mikiher mikiher deleted the keyboard-navigation branch March 9, 2024 07:35
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 this pull request may close these issues.

[Bug]: Author text input gets clipped when editing book details
2 participants