angular / angular/components

feat(aria/combobox): allow custom popup triggering logic

Đang mở
#32,493 0 bình luận 0 reaction 1 người được giao Được @ok7sai nhận Xem trên GitHub
feature P2
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ả

Currently I don't see a way to disable the default popup triggering logic for `ngComboboxInput`. It always pops up when I type in the input, however https://www.w3.org/WAI/ARIA/apg/patterns/combobox/ seems to indicate that the behavior should not be quite so persecriptive:

> Some possible conditions that trigger expansion include:
> - It is displayed when the Down Arrow key is pressed or the Open button is activated. Optionally, if the combobox is editable and contains a string that does not match an allowed value, expansion does not occur.
> - It is displayed when the combobox receives focus even if the combobox is editable and empty.
> - If the combobox is editable, the popup is displayed only if a certain number of characters are typed in the combobox and those characters match some portion of one of the suggested values.

I think the third example condition in particular is not captured well by the current design. I also think this is a common use case for things like editors with chips (e.g. like in the Github comment UI, when I type in a comment "fix my issue @wagnermaciel 😛" the popup triggers only when I type `@` and then again when I type `:`)

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

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

Đánh giá

Issue này chưa được đánh giá.

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.