Fix computation of the item sub range

We need to account for the repeater count in the item sub-range
This commit is contained in:
Olivier Goffart 2023-06-30 11:00:06 +02:00 committed by Olivier Goffart
parent 083023866d
commit e04835d209
2 changed files with 2 additions and 1 deletions

View file

@ -1839,6 +1839,7 @@ fn generate_sub_component(
"}} else if (index >= {} && index < {}) {{",
sub.index_of_first_child_in_tree,
sub.index_of_first_child_in_tree + sub_items_count - 1
+ sub.ty.repeater_count()
));
code.push(format!(
" return self->{}.{name}(index - {}{forward_args});",