I am stucked with the following:
I have two Jet views (in 2 js-files) and I want to show the second Jet View in the first in a window.
I always get the error:
Cannot call a class as a function
How to do that? It was quite simple in former Webix Jet Versions…
Hello, I’ve upgraded to 1.0.6 but I’m not sure how to reproduce your code. I’ve tried different things without success.
// The Jetview to embed in a window
import { JetView } from "webix-jet";
export default class MyEmbeddedJetview extends JetView {
config() {
return {
template: "This should be embedded in a window"
};
}
show(target) {
this.getRoot().show(target);
}
}
Then I define the container Jetview:
// The Jetview that should embed the first one
import { JetView } from "webix-jet";
import MyEmbeddedJetview from "./myJetview";
export default class MyContainerJetview extends JetView {
config() {
return {
// ...
}
}
init() {
const winTest = {
view: "window",
position: "center",
width: 300,
height: 200,
body: {
rows: [
{ template: "hello" },
{ template: "world" } // TEST 1: works fine
]
}
};
this.winTest= this.ui(winTest);
}
}
TEST 2: same window with a Jetview embedded => this does not work: