mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-19 05:30:33 +03:00
fix: forgot sort after adding bar
This commit is contained in:
+8
-1
@@ -134,10 +134,17 @@ export default {
|
||||
)
|
||||
let bar = {}
|
||||
bar[this.ganttChartProps.barStartKey] = time.format()
|
||||
bar[this.ganttChartProps.barEndKey] = time.add(this.getDefaultBarLength(), this.timeUnit).format()
|
||||
bar[this.ganttChartProps.barEndKey] = time
|
||||
.add(this.getDefaultBarLength(), this.timeUnit)
|
||||
.format()
|
||||
|
||||
bar.ganttBarConfig = { handles: true }
|
||||
this.bars.push(bar)
|
||||
this.bars.sort((first, second) =>
|
||||
moment(first[this.ganttChartProps.barStartKey]).diff(
|
||||
second[this.ganttChartProps.barStartKey]
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
onMouseover() {
|
||||
|
||||
Reference in New Issue
Block a user