ionic-team / ionic-team/ionic-framework
feat: Show popover on text input without click event
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 51
描述
### 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.
贡献指南
调研方向
Start by reviewing the popover APIs described in the issue: inline popovers, the isOpen property, and Controller popovers. Determine how a popover can target a text input or control without a user-generated event, including asynchronous display after a network request or on page load. Done means the behavior supports the requested use cases across the relevant framework integrations.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100