Comments (8)
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.
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.
@leCheveuCodeur What's your strategy to reset the gantt?
from svelte-gantt.
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.
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.
// 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.
I'm on chrome, but will test it anyway, thanks!
from svelte-gantt.
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)
- Expanded only work correctly for the first row HOT 1
- Make an option to print the entire gantt HOT 3
- dateAdapter HOT 1
- Custom styling for the whole gantt chart in svelte with tailwind or custom css? HOT 1
- Cannot read properties of undefined (reading '$$') HOT 2
- Custom task component HOT 1
- Row filtering HOT 2
- External draggable example not working HOT 3
- Can't get the demo to run locally HOT 3
- scaling manually HOT 3
- Fix: querySelector usage in selectTask() throws Uncaught DOMException HOT 1
- Event `gantt.api.timeranges.on.resized` returns previous `from` and `to` values HOT 2
- Collapsing parent rows dynamically results in unexpected child behavior HOT 1
- Block pulling tasks HOT 1
- How could I set the rowHeight for the target single row? HOT 7
- Task Color HOT 1
- Back to full year?
- Cannot synchronize scrolling HOT 1
- Dragging of tasks does not deselect previous selected task HOT 2
- TypeError: Cannot read properties of undefined (reading 'model') when updating rows and tasks HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-gantt.