mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] playground: properly resize editors when resizing panels
This commit is contained in:
@@ -314,6 +314,7 @@ class TabbedEditor extends owl.Component {
|
|||||||
const session = this.sessions[this.state.currentTab];
|
const session = this.sessions[this.state.currentTab];
|
||||||
session.setValue(this.props[this.state.currentTab], -1);
|
session.setValue(this.props[this.state.currentTab], -1);
|
||||||
this.editor.setSession(session);
|
this.editor.setSession(session);
|
||||||
|
this.editor.resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
willUnmount() {
|
willUnmount() {
|
||||||
@@ -322,12 +323,12 @@ class TabbedEditor extends owl.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTab(tab) {
|
setTab(tab) {
|
||||||
if (this.state.currentTab !== tab) {
|
if (this.state.currentTab !== tab) {
|
||||||
this.state.currentTab = tab;
|
this.state.currentTab = tab;
|
||||||
const session = this.sessions[this.state.currentTab];
|
const session = this.sessions[this.state.currentTab];
|
||||||
session.doc.setValue(this.props[tab], -1);
|
session.doc.setValue(this.props[tab], -1);
|
||||||
this.editor.setSession(session);
|
this.editor.setSession(session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMouseDown(ev) {
|
onMouseDown(ev) {
|
||||||
|
|||||||
Reference in New Issue
Block a user