list.js icon indicating copy to clipboard operation
list.js copied to clipboard

problem use the function with the `item:` option.

Open machupichu123 opened this issue 4 years ago • 2 comments

I found a problem use the function with the item: option.

I can't update using .values.

For example, here is the code. https://jsfiddle.net/pr38udgc/

I can update by writing HTML in the item: option, However, in the case of I can not update if I use a function getHtml.

I'm searching for 'Lucy', but when I write the getHtml for item: option, result shows 'Ernest Miller-Hemingway'.

In contrast in the case of I use HTML for item: option result shows 'Lucy Maud Montgomery' correctly.

So the userList object has been updated, but only the HTML doesn't seem to be updated.

machupichu123 avatar Nov 30 '20 09:11 machupichu123

I am having the same issue, did you eventually figure this out? I might dig in the source code to fix it otherwise.

devgianlu avatar Apr 07 '21 19:04 devgianlu

The current workaround is to set elm to undefined and then call update() on the list.

https://jsfiddle.net/smvhdaq3/

devgianlu avatar Apr 08 '21 10:04 devgianlu