ionic-team / ionic-team/ionic-framework

feat: Show popover on text input without click event

Đang mở
#29,874 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

Hi guys, I'm attempting to show a popover on a text input within a form. I would like to show this popover programmatically based on the results of a network request, without passing a trigger event to the popover. The docs I see describe 3 methods of showing popovers: inline popovers, showing via `isOpen` property, and Controller popovers. All of these methods appear to require a reference to a user-generated event.

### Describe the Use Case

Specifically, I have a form with a series of inputs, and a submit button. Upon submitting the form, I make a network request, and based on the results of this request I would like to show a popover on a text input to suggest changes for the user.

Another use case is to use a popover to call attention to a specific button or control when the page loads. For example, after the user loads a page, I could show a popover that says "You can click this button to take some action" to help people get started with the app.

### Describe Preferred Solution

One way to accomplish this would be to pass an element reference or ID to to the popover indicating the element I would like to target. I have an old AngularJS/Ionic v1 app that does it this way, and it accomplishes both of the use cases I mentioned.

### Describe Alternatives

I'm open to anything that allows me to show a popover asynchronously.

### Related Code

_No response_

### Additional Information

I am specifically using React here, but I imagine this would be of benefit to Angular and Vue as well.

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.