Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover directive only works as a toggle element #57

Open
Jozze opened this issue Nov 11, 2020 · 0 comments
Open

Popover directive only works as a toggle element #57

Jozze opened this issue Nov 11, 2020 · 0 comments

Comments

@Jozze
Copy link

Jozze commented Nov 11, 2020

Is it possible to change the directive so that we can choose if we want a toggle behavior or not?

public showOrHideOnClick(evt: Event): void {
        if (this.popoverOnHover) {
            return;
        }
        if (this.popoverDisabled) {
            return;
        }
        evt.stopImmediatePropagation();
        this.toggle(); // <-- maybe use an option to make it toggle or make it only disapear if we click outside of the element
    }

Same with the touch function.
I'm currently trying to use it for a context menu to set options for the clicked element.
That toggle behavior is breaking UX in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant