Removing and item for array does not update the list until user scrolls
See original GitHub issueIf I have a list of items:
<virtual-scroll (update)="themeItems = $event" [items]="themes" class="list-group"> <theme-item class="list-group-item" *ngFor="let themeItem of themeItems" [theme]="themeItem" (onDeleteTheme)="deleteTheme( $event, confirmDeleteTheme )"> </theme-item> </virtual-scroll>
onDeleteTheme removes an item for “themes” which is bound to items.
Once removed calling refresh() does not update the list. The item only gets removed once I scroll a little bit. Am I missing something here?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
State not updating after removing item from array in PageView
I believe the issue is how the Character object is passed from CharacterListState to CharacterState. It works properly when the user swipes ...
Read more >Removing Items from an Array in JavaScript - Ultimate Courses
In this article, we'll explore a few different ways to remove an item from an array in JavaScript. I will also show you...
Read more >Update By Query API | Elasticsearch Guide [8.5] | Elastic
When set to a value less then or equal to scroll_size then a scroll will not be used to retrieve the results for...
Read more >jQuery API Documentation
If you're updating to a newer version of jQuery, be sure to read the release notes ... Determine whether or not the list...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@blingerson, can you try to make
themes
an immutable array? ie. when you remove a theme from the array make sure to create a new array:@speige, this did indeed fix my issue. Thank you.