File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy implements I
101101 const overrideContext = view . overrideContext ;
102102 // any changes to the binding context?
103103 if ( bindingContext [ local ] === items [ currIndex ]
104+ && overrideContext . $index === currIndex
104105 && overrideContext . $middle === middle
105106 && overrideContext . $last === last
106107 ) {
@@ -109,9 +110,13 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy implements I
109110 }
110111 // update the binding context and refresh the bindings.
111112 bindingContext [ local ] = items [ currIndex ] ;
113+ overrideContext . $first = currIndex === 0 ;
112114 overrideContext . $middle = middle ;
113115 overrideContext . $last = last ;
114116 overrideContext . $index = currIndex ;
117+ const odd = currIndex % 2 === 1 ;
118+ overrideContext . $odd = odd ;
119+ overrideContext . $even = ! odd ;
115120 repeat . updateBindings ( view ) ;
116121 }
117122 // add new views
You can’t perform that action at this time.
0 commit comments