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

Show modal form when mouse hover on gantt #40

Closed
kesyous opened this issue Aug 26, 2021 · 4 comments
Closed

Show modal form when mouse hover on gantt #40

kesyous opened this issue Aug 26, 2021 · 4 comments

Comments

@kesyous
Copy link

kesyous commented Aug 26, 2021

I want to show when mouse hover a information modal form on a gantt chart item. How i can do it?

@ANovokmet
Copy link
Owner

I'm soon adding a new option to gantt, it is going to let you apply events to the DOM node of each task:

const options = {
    ...
    taskElementHook: (node, task) => {
        
        function onHover() {
            console.log('hover', task);
        }

        node.addEventListener('mouseenter', onHover);

        return {
            destroy() {
                console.log('destroy');
                node.removeEventListener('mouseenter', onHover);
            }
        }
    }
    ...
}

It is basically a svelte action.

@nettenm
Copy link

nettenm commented Nov 24, 2021

Hi,
when we can expect to get that feature? It would be nice, if we could give some kind of HTML-Template with URLs, Buttons, Functions etc. which renders onClick.

Thanks for the awesome work :)

@ANovokmet
Copy link
Owner

ANovokmet commented Nov 24, 2021

Hi, when we can expect to get that feature? It would be nice, if we could give some kind of HTML-Template with URLs, Buttons, Functions etc. which renders onClick.

Thanks for the awesome work :)

The taskElementHook feature is up. You could use it to add any event to tasks and append any other element (perhaps a modal) to document.body.

You could also do whatever you want on task select, see https://anovokmet.github.io/svelte-gantt/events

@kesyous
Copy link
Author

kesyous commented Dec 9, 2021

Hi, when we can expect to get that feature? It would be nice, if we could give some kind of HTML-Template with URLs, Buttons, Functions etc. which renders onClick.
Thanks for the awesome work :)

The taskElementHook feature is up. You could use it to add any event to tasks and append any other element (perhaps a modal) to document.body.

You could also do whatever you want on task select, see https://anovokmet.github.io/svelte-gantt/events

Thanks :)

@kesyous kesyous closed this as completed Dec 15, 2021
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

3 participants