angular / angular/components

Autocomplete initial positioning

Đang mở
#8,314 11 bình luận 4 reaction 0 người được giao Xem trên GitHub
area: material/autocomplete P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### Bug, feature request, or proposal:
I have a project where the `autocomplete` dropdown does not properly position itself until it the input box that it is acting upon is unfocused and refocused. It initially extends past the bottom of the screen, choosing to initially position on the bottom of its input box.

Perhaps there could be a directive to force positioning of an `autocomplete` dropdown?

#### What is the expected behavior?
Expected behavior is for the `autocomplete` dropdown to recognize that it will be off-screen if it extends downward and instead position itself above the input box.

#### What is the current behavior?
In its current behavior, the `autocomplete` dropdown only calculates its position properly once its input box has been refocused. Switching tabs also causes the `autocomplete` dropdown to position properly.

#### What are the steps to reproduce?
The project in which this bug is occurring is already large and mature. I have, as of yet, been unable to reproduce this issue within a simple context.

#### What is the use-case or motivation for changing an existing behavior?
There may be cases where the code does not properly position the `autocomplete` dropdown. Adding a directive or other such mechanism for forcing positioning may prove useful.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
```
@angular/cli: 1.5.0
@angular/material: 2.0.0-beta.12
typescript: 2.3.3
OS: (Gentoo) Linux
Browsers: webkit and gecko
```

#### Is there anything else we should know?
I don't particularly expect great support since I am unable to provide reproducable steps, but thanks in advance anybody's time in addressing this matter.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Không có tệp nguồn, bài kiểm thử hoặc ví dụ có thể tái hiện nào được nêu. Hãy bắt đầu bằng cách xây dựng một bản tái hiện tối thiểu của việc autocomplete mở gần cuối viewport, sau đó lần theo đường đi của quá trình định vị ban đầu và so sánh với hành vi khi refocus và khi chuyển tab. Được xem là hoàn tất khi dropdown ban đầu di chuyển lên trên ô nhập nếu nó sẽ tràn ra ngoài màn hình.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.