Question about "unitlist" component

Hi Alexandra,

How can I add a button control in each list for a unitlist component?
I have used the "ActiveContent", but is doesn't work.
Please help me, thank you!

Hi,

probably you forget to create the new view that based on unitlist and dhx.ActiveContent module. Please see samples/04_list/09_active.html demo.

dhx.protoUI({
name:“activeList”
},dhx.ui.unitlist,dhx.ActiveContent);

dhx.ui({
view:“activeList”,

})

Hi Alexandra,

Here is my js code below.
It doesn't work, could you help me?
[i]var config = [{
	type: "class1",
	name: "item1"
}, {
	type: "class1",
	name: "item2"
}, {
	type: "class2",
	name: "item3"
}, {
	type: "class1",
	name: "item4"
}];
dhx.ready(function(){
	dhx.protoUI({
		name: "activeunitlist"
	}, dhx.ui.unitlist, dhx.ActiveContent);
	dhx.ui({
        view: "activeunitlist",
        activeContent: {
			selectButton: {
				id: "selectButtonId",
				view: "button",
				label: "select",
				width: 140
			}
        },
        uniteBy: function(obj) {
        	return obj.type;
        },
        datatype: "json",
        data: config,
        template: "<div style='float:left'>#name#</div><div style='float:right'>{common.selectButton()}</div>"
        //template: "<div style='float:left'>#name#</div>"
    });
});[/i]

Hi,

We have found an issue with common in unitlist. Please try fixed libraries from the attachment.
libs.zip (175 KB)

Hi Alexandra,

Thanks for your help.
I'll try it later.