mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(popover): update prop defaults, use correct delegate (#23340)
This commit is contained in:
@@ -824,7 +824,7 @@ ion-picker,css-prop,--min-width
|
||||
ion-picker,css-prop,--width
|
||||
|
||||
ion-popover,shadow
|
||||
ion-popover,prop,alignment,"center" | "end" | "start",'center',false,false
|
||||
ion-popover,prop,alignment,"center" | "end" | "start",'start',false,false
|
||||
ion-popover,prop,animated,boolean,true,false,false
|
||||
ion-popover,prop,arrow,boolean,true,false,false
|
||||
ion-popover,prop,backdropDismiss,boolean,true,false,false
|
||||
|
||||
@@ -205,7 +205,7 @@ export class Popover implements ComponentInterface, OverlayInterface {
|
||||
/**
|
||||
* Describes how to align the popover content with the `reference` point.
|
||||
*/
|
||||
@Prop() alignment: PositionAlign = 'center';
|
||||
@Prop() alignment: PositionAlign = 'start';
|
||||
|
||||
/**
|
||||
* If `true`, the popover will display an arrow
|
||||
@@ -437,7 +437,14 @@ export class Popover implements ComponentInterface, OverlayInterface {
|
||||
destroyDismissInteraction();
|
||||
this.destroyDismissInteraction = undefined;
|
||||
}
|
||||
await detachComponent(this.delegate, this.usersElement);
|
||||
|
||||
/**
|
||||
* If using popover inline
|
||||
* we potentially need to use the coreDelegate
|
||||
* so that this works in vanilla JS apps
|
||||
*/
|
||||
const delegate = (this.inline) ? this.delegate || this.coreDelegate : this.delegate;
|
||||
await detachComponent(delegate, this.usersElement);
|
||||
}
|
||||
|
||||
this.currentTransition = undefined;
|
||||
|
||||
@@ -569,7 +569,7 @@ export default defineComponent({
|
||||
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------- |
|
||||
| `alignment` | `alignment` | Describes how to align the popover content with the `reference` point. | `"center" \| "end" \| "start"` | `'center'` |
|
||||
| `alignment` | `alignment` | Describes how to align the popover content with the `reference` point. | `"center" \| "end" \| "start"` | `'start'` |
|
||||
| `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` |
|
||||
| `backdropDismiss` | `backdrop-dismiss` | If `true`, the popover will be dismissed when the backdrop is clicked. | `boolean` | `true` |
|
||||
|
||||
Reference in New Issue
Block a user