mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] playground: debounce some handlers
This commit is contained in:
@@ -78,6 +78,10 @@ class App extends owl.Component {
|
|||||||
leftPaneWidth: Math.ceil(window.innerWidth / 2),
|
leftPaneWidth: Math.ceil(window.innerWidth / 2),
|
||||||
topPanelHeight: null
|
topPanelHeight: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.toggleLayout = owl.utils.debounce(this.toggleLayout, 250, true);
|
||||||
|
this.runCode = owl.utils.debounce(this.runCode, 250, true);
|
||||||
|
this.downloadCode = owl.utils.debounce(this.downloadCode, 250, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
displayError(error) {
|
displayError(error) {
|
||||||
@@ -254,6 +258,7 @@ class TabbedEditor extends owl.Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
currentTab: props.js ? "js" : props.xml ? "xml" : "css"
|
currentTab: props.js ? "js" : props.xml ? "xml" : "css"
|
||||||
};
|
};
|
||||||
|
this.setTab = owl.utils.debounce(this.setTab, 250, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Reference in New Issue
Block a user