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

Gantt taskRender event does not pass task element #1288

Closed
ExtAnimal opened this issue Aug 4, 2020 · 0 comments
Closed

Gantt taskRender event does not pass task element #1288

ExtAnimal opened this issue Aug 4, 2020 · 0 comments
Assignees
Labels
bug Something isn't working resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@ExtAnimal
Copy link

Simple addition to existing test case in TaskRendering.t.js shows it:

    t.it('Should trigger renderTask and releaseTask', async t => {
        let renderCount = 0, releaseCount = 0;

        gantt = await t.getGanttAsync({
            listeners : {
                renderTask({ element }) {
                    renderCount++;
                    t.ok(element, 'Element passed in renderTask event');
                },

                releaseTask() {
                    releaseCount++;
                }
            }
        });

        const initialRenderCount = renderCount;

        t.diag('Initial render');

        t.is(renderCount, document.querySelectorAll('.b-gantt-task').length, 'Correct render count');
        t.is(releaseCount, 0, 'Correct release count');

        t.diag('Remove task');

        gantt.taskStore.last.remove();

        t.is(renderCount, initialRenderCount, 'Correct render count');
        t.is(releaseCount, 1, 'Correct release count');
    });
@ExtAnimal ExtAnimal added the bug Something isn't working label Aug 4, 2020
@isglass isglass added this to the Gantt 4.0.0 milestone Aug 4, 2020
@isglass isglass self-assigned this Aug 5, 2020
@isglass isglass added in progress ready for review Issue is fixed, the pull request is being reviewed resolved Fixed but not yet released (available in the nightly builds) and removed in progress ready for review Issue is fixed, the pull request is being reviewed labels Aug 5, 2020
@SergeyMaltsev SergeyMaltsev modified the milestones: Gantt 4.0.0, 4.0.0 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

3 participants