FIX: Deprecated debounce function

This commit is contained in:
Robin Ward 2016-02-17 17:17:43 -05:00
parent 587e9d917c
commit 37fe36778b
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,5 @@
import debounce from 'discourse/lib/debounce';
export default Ember.Component.extend({ export default Ember.Component.extend({
actions: { actions: {
@ -111,7 +113,7 @@ export default Ember.Component.extend({
return tables; return tables;
}, },
triggerFilter: Discourse.debounce(function() { triggerFilter: debounce(function() {
this.set('filteredTables', this.filterTables(this.get('transformedSchema'))); this.set('filteredTables', this.filterTables(this.get('transformedSchema')));
this.set('loading', false); this.set('loading', false);
}, 500).observes('filter'), }, 500).observes('filter'),

View File

@ -1,3 +1,4 @@
import debounce from 'discourse/lib/debounce';
import highlightSyntax from 'discourse/lib/highlight-syntax'; import highlightSyntax from 'discourse/lib/highlight-syntax';
export default Ember.Component.extend({ export default Ember.Component.extend({
@ -7,7 +8,7 @@ export default Ember.Component.extend({
buffer.push("</code></pre>"); buffer.push("</code></pre>");
}, },
_refreshHighlight: Discourse.debounce(function() { _refreshHighlight: debounce(function() {
this.rerender(); this.rerender();
}, 50).observes('value'), }, 50).observes('value'),