Skip to content

Commit 5bbc134

Browse files
committed
list.Base: createItem() => support for vdom objects #796
1 parent c85c2ac commit 5bbc134

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/list/Base.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,20 +210,19 @@ class Base extends Component {
210210
const item = {
211211
tag : 'li',
212212
cls : [me.itemCls],
213-
html : me.createItemContent(record),
214213
id : me.getItemId(record[me.getKeyProperty()]),
215214
tabIndex: -1
216215
};
217216

218-
item[typeof itemContent === 'string' ? 'html' : 'vdom'] = itemContent;
217+
item[typeof itemContent === 'string' ? 'html' : 'cn'] = itemContent;
219218

220219
return item;
221220
}
222221

223222
/**
224223
* Override this method for custom renderers
225224
* @param {Object} record
226-
* @returns {Object|String} Either an vdom object or a html string
225+
* @returns {Object[]|Object|String} Either an vdom cn array or object, or a html string
227226
*/
228227
createItemContent(record) {
229228
let me = this,

0 commit comments

Comments
 (0)