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

Placeholder and selected item overflows and hides the clear-button / arrow #597

Open
dannyyy opened this issue Jan 22, 2025 · 2 comments
Open

Comments

@dannyyy
Copy link

dannyyy commented Jan 22, 2025

Describe the bug
If the slim-select is within a div with a restricted size, then any text (placeholder, item text) will overflow and hides all control elements such as the clear button or the dropdown arrow.

If the layout allows to grow in height, then the selected item's text will be wrapped, and destroys the layout.

I expect (as the slimselect.css indicates), that any text that is longer as the controls width will be cut (ellipsis, ...) and the layout will be maintained under all circumstances

Recreate it in Codepen
https://jsfiddle.net/f5oxh8bq/8/

To Reproduce
Use the demo: https://jsfiddle.net/f5oxh8bq/8/

@brianvoe
Copy link
Owner

I agree with this. This issue has popped up a few times when people have needed to make css changes in the past

@dannyyy
Copy link
Author

dannyyy commented Jan 23, 2025

This should solve the issue:

.ss-main .ss-values {
  ...
  min-width: 0;
}

.ss-main .ss-values .ss-single {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display:block;
}

.ss-main .ss-values .ss-placeholder {
  ...
  display:block;
}

I updated the example:
https://jsfiddle.net/vq87ah2g/4/

Could you incorporate this change? May there are some more adjusstments necessary for certain settings I haven't used yet

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

No branches or pull requests

2 participants