Skip to content

Commit

Permalink
Require svelte-gantt ^4.4.2 and simplify addRows logic
Browse files Browse the repository at this point in the history
  • Loading branch information
paul121 committed Sep 13, 2024
1 parent 4897fbf commit d309505
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Change addTasks method to accept an object with updateRange
- Require svelte-gantt ^4.4.2

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
},
"dependencies": {
"moment": "^2.30.1",
"svelte-gantt": "^4.4.0"
"svelte-gantt": "^4.4.2"
}
}
3 changes: 0 additions & 3 deletions src/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ const createInstance = ({ target, options = {}}) => {
return {
highlightPast: options.highlightPast,
padding: options.padding,
// @todo Remove this.rows state.
// See https://github.com/ANovokmet/svelte-gantt/issues/231
rows: [],
timeline: new SvelteGantt({
target: target,
props: {...default_props, ...options.props},
Expand Down
7 changes: 1 addition & 6 deletions src/methods.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Helper function to add rows.
export function addRows(rows) {
// @todo Remove this.rows state and use timeline.updateRows() once working.
// See https://github.com/ANovokmet/svelte-gantt/issues/231
this.rows.push(...rows);
this.timeline.$set({
rows: this.rows,
});
this.timeline.updateRows(rows);
}

// Helper function to add tasks.
Expand Down

0 comments on commit d309505

Please sign in to comment.