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

When the [Bug Report] select component is multiple-selected, the text is too long and the display box overflows. #15473

Open
grace618 opened this issue May 9, 2019 · 6 comments
Labels

Comments

@grace618
Copy link

grace618 commented May 9, 2019

Element UI version

2.8.2

OS/Browsers version

chrome/win10

Vue version

2.6.10

Reproduction Link

https://codepen.io/anon/pen/jobgBq?&editable=true

Steps to reproduce

选择select第一项

What is Expected?

显示框可以自适应宽度吗

What is actually happening?

文本溢出

@element-bot element-bot changed the title [Bug Report] select组件多选时,文本过长,显示框会溢出, When the [Bug Report] select component is multiple-selected, the text is too long and the display box overflows. May 9, 2019
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.8.2

OS/Browsers version

Chrome/win10

Vue version

2.6.10

Reproduction Link

Https://codepen.io/anon/pen/jobgBq?&editable=true

Steps to reproduce

Select the first item

What is Expected?

Can Display Box Adapt Width

What is actually happening?

Text overflow

@kissu
Copy link

kissu commented Feb 17, 2020

Any idea on how to fix that one ? 🙏

Monkey patched it with

.el-tag--info {
	display: flex !important;
	max-width: 100% !important;
}
.el-select__tags-text {
	display: inline-block !important;
	max-width: 90% !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}
.el-tag__close {
	align-self: center !important;
}

@HenryTSZ
Copy link

@kissu The collapse-tags have a little problem

collapse-tags

@kissu
Copy link

kissu commented Feb 20, 2020

@kissu The collapse-tags have a little problem

collapse-tags

Pretty sure you can fix that one with some height on the select box. 😁

@perska124
Copy link

perska124 commented May 29, 2020

Any idea on how to fix that one ? 🙏

Monkey patched it with

.el-tag--info {
	display: flex !important;
	max-width: 100% !important;
}
.el-select__tags-text {
	display: inline-block !important;
	max-width: 90% !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}
.el-tag__close {
	align-self: center !important;
}

Despite the height, there should be no dots in +...
Fot me it works fine with max-width: 100% !important instead of 90% here:

.el-select__tags-text {
	display: inline-block !important;
	max-width: 100% !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

@stale
Copy link

stale bot commented Jun 4, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants