canui.List add elements not only at the end
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Now elements in {data} add event only added in the end
rowElements.last().after(newRows);
it would be better to determine index where elements where added
var index = list.indexOf(observes[0]) - 1;
if (index == -1) rowElements.first().before(newRows)
else
rowElements.eq(index).after(newRows);
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the canui.List handling for add events on {data}, using the shown rowElements and list operations as the entry point. Trace how the added elements are identified and verify that new rows are inserted at their corresponding index rather than always appended; done means additions at the beginning, middle, and end appear in the correct order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100