GithubHelp home page GithubHelp logo

Comments (8)

labs20 avatar labs20 commented on July 23, 2024

This fix may work for rows, but its not working for tasks. And if I give numeric ids for my tasks, the gantt wont refresh when I get a new payload from the server.

from svelte-gantt.

leCheveuCodeur avatar leCheveuCodeur commented on July 23, 2024

Yes, it is currently not possible to update a task using the updateTask method.
If you use this method, the task is hidden. The only solution is to reset the entire gantt.

from svelte-gantt.

labs20 avatar labs20 commented on July 23, 2024

@leCheveuCodeur What's your strategy to reset the gantt?

from svelte-gantt.

leCheveuCodeur avatar leCheveuCodeur commented on July 23, 2024

You need to re-set gantt using the set method, passing all rows and tasks back to it.
To save on queries, you can strocker an array and just update the task concerned, then set gantt again.

from svelte-gantt.

labs20 avatar labs20 commented on July 23, 2024

Yeah, its what I'm tryingo to do, but when I reset from a scenario with fewer tasks to one witch many more tasks, the gantt wont refresh right, sometimes it keeps the old tasks, and when I do vice versa, from a tree with many tasks to a smaller task tree, it keeps the older tasks too.

The funny funny thing is that if I hit F5, it refreshs and renders itself correctly, with the same payload that it has previously failed.

from svelte-gantt.

leCheveuCodeur avatar leCheveuCodeur commented on July 23, 2024

// Fix for FireFox setTimeout(function(){ $('.sg-table ').css('width',301) }, 2);
IF you're on Firefox we had this refresh problem that we had to fix by simulating a change in row size, see if that helps...

from svelte-gantt.

labs20 avatar labs20 commented on July 23, 2024

I'm on chrome, but will test it anyway, thanks!

from svelte-gantt.

labs20 avatar labs20 commented on July 23, 2024

No joy. When I update the gantt from many tasks to fewer, it leaves the last old ones. Looks like no cleaning is in place when you use "set" again.

And those wont do what you'd expect:

                       this.gantt.$set({
                            rows: [],
                            tasks: [],
                            dependencies: [],
                        });
                        this.gantt.$set({
                            rows: false,
                            tasks: false,
                            dependencies: false,
                        });
                        this.gantt.$set({
                            rows: null,
                            tasks: null,
                            dependencies: null,
                        });

from svelte-gantt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.