sunmingtao / sample-code

3 stars 4 forks source link

Banjo: gap between index of dynamically generated rows #167

Closed sunmingtao closed 3 years ago

sunmingtao commented 3 years ago

Hit https://dl-devel.nla.gov.au/banjo/jobs/new/generic-batch Enter a valid parent Click 'Add 10 more jobs' button The job index has gap in it. image

sunmingtao commented 3 years ago

Turns out some dynamic contents loaded by Ajax also happen to have the <tbody> element, which results the rows to be appended to multiple tbody.

The lesson is use id to select the UI element whenever possible to avoid this type of subtle issues.

image