The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/rocketchat-ui/client/components/popupList.js

31 lines
715 B

Template.popupList.helpers({
config() {
return {
template: this.data.template_list || 'popupList_default',
data: {
noMatchTemplate: this.data.noMatchTemplate,
template_item :this.data.template_item || 'popupList_item_default',
items: this.items,
onClick: this.data.onClick || function() {},
modifier: this.data.modifier || function(text) { return text; }
}
};
},
open() {
const instance = Template.instance();
return instance.data.items.length > 0;
}
});
Template.popupList_default.helpers({
config(item) {
return {
template: this.template_item || 'popupList_item_default',
data: {
item,
onClick: this.onClick,
modifier: this.modifier
}
};
}
});