mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Re-render chart whenever data changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import { computed, observer } from '@ember/object';
|
||||
import { run } from '@ember/runloop';
|
||||
import { assign } from '@ember/polyfills';
|
||||
import { guidFor } from '@ember/object/internals';
|
||||
@@ -66,6 +66,10 @@ export default Component.extend(WindowResizable, {
|
||||
this.renderChart();
|
||||
},
|
||||
|
||||
updateChart: observer('_data.@each.{value,label,className}', function() {
|
||||
this.renderChart();
|
||||
}),
|
||||
|
||||
// prettier-ignore
|
||||
/* eslint-disable */
|
||||
renderChart() {
|
||||
|
||||
Reference in New Issue
Block a user