mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(popover): allow arrow on desktop (#25056)
This commit is contained in:
@ -207,9 +207,8 @@ export class Popover implements ComponentInterface, PopoverInterface {
|
||||
@Prop({ mutable: true }) alignment?: PositionAlign;
|
||||
|
||||
/**
|
||||
* If `true`, the popover will display an arrow
|
||||
* that points at the `reference` when running in `ios` mode
|
||||
* on mobile. Does not apply in `md` mode or on desktop.
|
||||
* If `true`, the popover will display an arrow that points at the
|
||||
* `reference` when running in `ios` mode. Does not apply in `md` mode.
|
||||
*/
|
||||
@Prop() arrow = true;
|
||||
|
||||
@ -589,7 +588,7 @@ export class Popover implements ComponentInterface, PopoverInterface {
|
||||
const mode = getIonMode(this);
|
||||
const { onLifecycle, popoverId, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
|
||||
const desktop = isPlatform('desktop');
|
||||
const enableArrow = arrow && !parentPopover && !desktop;
|
||||
const enableArrow = arrow && !parentPopover;
|
||||
|
||||
return (
|
||||
<Host
|
||||
|
@ -955,14 +955,14 @@ export default {
|
||||
| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------- |
|
||||
| `alignment` | `alignment` | Describes how to align the popover content with the `reference` point. Defaults to `'center'` for `ios` mode, and `'start'` for `md` mode. | `"center" \| "end" \| "start" \| undefined` | `undefined` |
|
||||
| `animated` | `animated` | If `true`, the popover will animate. | `boolean` | `true` |
|
||||
| `arrow` | `arrow` | If `true`, the popover will display an arrow that points at the `reference` when running in `ios` mode on mobile. Does not apply in `md` mode or on desktop. | `boolean` | `true` |
|
||||
| `arrow` | `arrow` | If `true`, the popover will display an arrow that points at the `reference` when running in `ios` mode. Does not apply in `md` mode. | `boolean` | `true` |
|
||||
| `backdropDismiss` | `backdrop-dismiss` | If `true`, the popover will be dismissed when the backdrop is clicked. | `boolean` | `true` |
|
||||
| `component` | `component` | The component to display inside of the popover. You only need to use this if you are not using a JavaScript framework. Otherwise, you can just slot your component inside of `ion-popover`. | `Function \| HTMLElement \| null \| string \| undefined` | `undefined` |
|
||||
| `componentProps` | -- | The data to pass to the popover component. You only need to use this if you are not using a JavaScript framework. Otherwise, you can just set the props directly on your component. | `undefined \| { [key: string]: any; }` | `undefined` |
|
||||
| `dismissOnSelect` | `dismiss-on-select` | If `true`, the popover will be automatically dismissed when the content has been clicked. | `boolean` | `false` |
|
||||
| `enterAnimation` | -- | Animation to use when the popover is presented. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
|
||||
| `event` | `event` | The event to pass to the popover animation. | `any` | `undefined` |
|
||||
| `htmlAttributes` | -- | Additional attributes to pass to the popover. | `PopoverAttributes \| undefined` | `undefined` |
|
||||
| `htmlAttributes` | -- | Additional attributes to pass to the popover. | `HTMLAttributes<HTMLElement> \| undefined` | `undefined` |
|
||||
| `isOpen` | `is-open` | If `true`, the popover will open. If `false`, the popover will close. Use this if you need finer grained control over presentation, otherwise just use the popoverController or the `trigger` property. Note: `isOpen` will not automatically be set back to `false` when the popover dismisses. You will need to do that in your code. | `boolean` | `false` |
|
||||
| `keyboardClose` | `keyboard-close` | If `true`, the keyboard will be automatically dismissed when the overlay is presented. | `boolean` | `true` |
|
||||
| `leaveAnimation` | -- | Animation to use when the popover is dismissed. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
|
||||
|
Reference in New Issue
Block a user