Skip to content

Commit

Permalink
[Controls] Do not Close Flyouts on Outside Click (#128548)
Browse files Browse the repository at this point in the history
Do not close on outside click for controls flyouts
  • Loading branch information
ThomThomson authored Mar 28, 2022
1 parent 310c1ba commit c0a8bfa
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface OverlayFlyoutOpenOptions
| [maskProps?](./kibana-plugin-core-public.overlayflyoutopenoptions.maskprops.md) | EuiOverlayMaskProps | <i>(Optional)</i> |
| [maxWidth?](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md) | boolean \| number \| string | <i>(Optional)</i> |
| [onClose?](./kibana-plugin-core-public.overlayflyoutopenoptions.onclose.md) | (flyout: OverlayRef) =&gt; void | <i>(Optional)</i> EuiFlyout onClose handler. If provided the consumer is responsible for calling flyout.close() to close the flyout; |
| [outsideClickCloses?](./kibana-plugin-core-public.overlayflyoutopenoptions.outsideclickcloses.md) | boolean | <i>(Optional)</i> |
| [ownFocus?](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | boolean | <i>(Optional)</i> |
| [size?](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md) | EuiFlyoutSize | <i>(Optional)</i> |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [outsideClickCloses](./kibana-plugin-core-public.overlayflyoutopenoptions.outsideclickcloses.md)

## OverlayFlyoutOpenOptions.outsideClickCloses property

<b>Signature:</b>

```typescript
outsideClickCloses?: boolean;
```
1 change: 1 addition & 0 deletions src/core/public/overlays/flyout/flyout_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface OverlayFlyoutOpenOptions {
size?: EuiFlyoutSize;
maxWidth?: boolean | number | string;
hideCloseButton?: boolean;
outsideClickCloses?: boolean;
maskProps?: EuiOverlayMaskProps;
/**
* EuiFlyout onClose handler.
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,8 @@ export interface OverlayFlyoutOpenOptions {
maxWidth?: boolean | number | string;
onClose?: (flyout: OverlayRef) => void;
// (undocumented)
outsideClickCloses?: boolean;
// (undocumented)
ownFocus?: boolean;
// (undocumented)
size?: EuiFlyoutSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const CreateControlButton = ({
</PresentationUtilProvider>
),
{
outsideClickCloses: false,
onClose: (flyout) => onCancel(flyout),
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const EditControlButton = ({ embeddableId }: { embeddableId: string }) =>
reduxContainerContext
),
{
outsideClickCloses: false,
onClose: (flyout) => onCancel(flyout),
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const EditControlGroup = ({
</PresentationUtilProvider>
),
{
outsideClickCloses: false,
onClose: () => flyoutInstance.close(),
}
);
Expand Down

0 comments on commit c0a8bfa

Please sign in to comment.