-
Notifications
You must be signed in to change notification settings - Fork 1.8k
resizing #880
Comments
Please post a reproduction in Plunker. |
I have a similar issue. Plunkr: http://plnkr.co/edit/P2oKYO9Kx80Clog0IgnN?p=preview Open the ui-select, the width is fine. Versions: |
+1 I have almost the same problem as @peterreisz. When you resize the screen, angular adds "style='width: ...px;'" to the input, it varies according to the screen, but always the wrong size, bigger than it's parent. Versions: UPDATE I altered the function "ctrl.sizeSearchInput", in the line 737, "var inputWidth = containerWidth - input.offsetLeft - 10;", I changed to "var inputWidth = containerWidth - input.offsetLeft - 30;". It worked for me. UPDATE 2 I guess the correct way would be to set offsetLeft to 20, right? How can I set it? I added the attribute "offsetLeft='20'" to my html, but when the control is rendered, angular ignores it. UPDATE 3 So, I didn't realize that "offsetLeft" is a DOM property. |
I have a suggestion to resolve this, could someone please make a PR? It's kinda simple, I created an attribute called "customOffsetLeft" that you set in the element and it is used when you calculate the width of the input when the screen is resized. Here's my suggestion: |
I have an easier solution, that worked for me: .ui-select-search { |
angular-ui#267 angular-ui#378 angular-ui#558 angular-ui#399 angular-ui#819 angular-ui#880 angular-ui#1311 Essentially provides better control over direction to open, and we make sure the drop up/down element isnt clipped by bounding containers with overflow settings.
Hi,
I have a ui-select but there is a problem when resizing the div the control is contained in
when resizing the containing div (outside of browser resize) the control does not resize until you add a new item or remove an existing item
Is there a fix for this ?
Mac
The text was updated successfully, but these errors were encountered: