Skip to content

Commit bd43f1a

Browse files
committed
minicharts trigger off model.values "add" event
1 parent d81592f commit bd43f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scout-ui/src/field-list/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ var BasicFieldView = View.extend({
3636
},
3737
initialize: function() {
3838
var that = this;
39-
// the debounce cuts down computation time by a factor of 5-10 here
40-
this.model.types.on('sync', _.debounce(function() {
39+
// debounce prevents excessive rendering
40+
this.model.values.on('add', _.debounce(function(evt) {
4141
// for now pick first type, @todo: make the type bars clickable and toggle chart
4242
that.switchView(that.model.types.at(0));
4343
}, 300));

0 commit comments

Comments
 (0)