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

@ -867,7 +867,7 @@ fn generate_sub_component(
));
if sub_items_count > 1 {
let range_begin = local_index_of_first_child;
let range_end = range_begin + sub_items_count - 2;
let range_end = range_begin + sub_items_count - 2 + sub.ty.repeater_count();
accessible_role_branch.push(quote!(
#range_begin..=#range_end => #sub_compo_field.apply_pin(_self).accessible_role(index - #range_begin + 1),
));