This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Variable element width support in multiple mode #1252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, search input width maintained to take entire room available after selected items if there are. There are apparently two reasons to do that:
The search input size-related code is built on assumption that there are only internal sources of available room change, like adding or removing choices. That's mostly true if entire ui-select has fixed width. In other case if ui-select width is not fixed there are external things affecting it which we can't control, like parent container size change (due to window resize, for example), or dynamic styles changes (for example, choices might be hidden with css when dropdown is open).
This PR is aiming to make the element working better with variable width:
width
andmin-width
values which can be easily overridden in user code.demo-multi-select.html
having variable width. It seems there is no need to have them fixed-width now. The demo also shows how's the modified element working.