bitovi / bitovi/canui

canui.List add elements not only at the end

Open
#18 2 comments 0 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.