mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
fix: fix issue with wrong editor content when changing sample
This commit is contained in:
+6
-1
@@ -85,7 +85,12 @@ class Playground extends Component {
|
||||
|
||||
setSample(ev) {
|
||||
const sample = SAMPLES.find(s => s.description === ev.target.value);
|
||||
this.editor.setValue(sample.code, -1);
|
||||
this.updateState({
|
||||
js: sample.code,
|
||||
css: "",
|
||||
xml: ""
|
||||
});
|
||||
this.editor.setValue(this.state[this.state.currentTab], -1);
|
||||
}
|
||||
|
||||
updateStateFromEditor() {
|
||||
|
||||
Reference in New Issue
Block a user