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

use flex instead of recalculating input width #19

Closed
wants to merge 1 commit into from

Conversation

pirxpilot
Copy link
Contributor

No description provided.

make input width grow to cover all the space not used already by tags
@@ -1,5 +1,6 @@
.tags-input {
display: inline-block;
display: inline-flex;
flex-wrap: wrap;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this would need a min-width if it were to match the current implementation, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought we would need min-width on the .tags-input input - it would make input render on new line if there isn't enough space for it. But I wasn't sure I can come up with a reasonable defaults (percentage, absolute value?). I'll gladly to add whatever defaults you seem appropriate.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say min-width should be 25% since the old calculation was Math.max(..., w / 4).
And maybe also add a min-width on the whole .tags-input.
Btw thank you guys, this component is awesome 😄 👍

@pirxpilot pirxpilot closed this Feb 22, 2024
@pirxpilot pirxpilot deleted the flex-vs-compute branch February 22, 2024 06: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.

None yet

3 participants