Bug report: The datatable doesn't render data while you close and reopen it.

I made a simple test to reproduce this issue. Click ‘Open’ button, the first time the data is shown ok. then you close the pannel and open again the data disappear.

		webix.ui({
			id: "Services",
			view: "form",
			elements: [{
						view: "toolbar", height: 30, paddingY: 1,
						css: "toolbar",
						cols: [{ view: "button", label: "Open", width: 100, click: onOpen}]
					  }]
		});

		var classPanelData = [
			{ view: "toolbar", height: 30, paddingY: 1,
				css: "toolbarBtn",
				cols: [
					{ view: "button", label: "New", width: 100 },
					{ view: "button", label: "Modify", width: 100 },
					{ view: "button", label: "Remove", width: 100 }
				]
			},
			{ view: "datatable",
				select: "row",
				resizeColumn: true,
				multiselect: true,
				columns: [
					{ id: "name", header: "Name", width: 150 },
					{ id: "commands", header: "Commands", fillspace: true }
				],
				data: [{ name: "s1", commands: "test"},
						{ name: "s2", commands: "test..."}]

			}
		];


		function onOpen() {
			var panel = webix.ui({
				id: 'clsEdit',
				view: "window",
				width: document.body.clientWidth - 50,
				height: document.body.clientHeight - 100,
				head: {
					view: "toolbar", cols: [
			{ view: "label", label: "Service Class Edit" },
			{ view: "button", label: "Close", width:60,
				click: "$$('clsEdit').close();"
			}]
				},
				body: {
					rows: classPanelData
				}
			});
			panel.show({ x: 25, y: 5 });
		}
	</script>
</body>

check this: http://webix.com/snippet/06dc2ef7

Problem caused by component destructor, which nullify inner reference to data ( to prevent memory leaks )

You can

a) use webix.copy when adding some constant config in dynamic ( destructable ) view
http://webix.com/snippet/4612df7d

or

b) use a function for subview config generation
http://webix.com/snippet/127aeeba

Normally, when you are not using destructor ( window.close ) you can use static config, but if you plan to destroy and recreate UI - you need to use one of above solution

Thank you. now it works.

i want to say< if click open 2 times, close button will be triggered 1 time , how to fix this problem?

You are using fixed ID for the window view, if you need to have 2 windows - you must not use hardcoded IDs.

If you need just one window and want prevent closing one, you can use code like

if (!$$("clsEdit")) {
   var panel = webix.ui({....});