Skip to content

Commit

Permalink
popover-fix popover open issue (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr authored Oct 10, 2024
1 parent 8b214cc commit a79c7f0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/flow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Change Log

## [2.11.4] - 2024-10-10

### patch changes

- overlay-click event behavior updated

## [2.11.3] - 2024-10-09

### patch changes
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nonfx/flow-core",
"version": "2.11.3",
"version": "2.11.4",
"description": "Core package of flow design system",
"type": "module",
"module": "dist/flow-core.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-core/src/components/f-popover/f-popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export class FPopover extends FRoot {
}

outsideClick = (e: MouseEvent) => {
if (this.open) {
if (this.open && e?.target !== this.targetElement) {
const rect = this.getBoundingClientRect();
const isInsideClick =
e.clientX > rect.left &&
Expand Down
1 change: 1 addition & 0 deletions stories/flow-core/f-popover.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const Playground = {
const popoverRef = createRef<FPopover>();
const handlePopover = (_e: CustomEvent) => {
if (popoverRef.value) {
console.log("in handle popover");
popoverRef.value.open = !popoverRef.value.open;
}
};
Expand Down

0 comments on commit a79c7f0

Please sign in to comment.