Frontmatter
| id | 7315 |
| title | collection.Base#filter() should use constructor for allItems |
| state | Closed |
| labels | bug |
| assignees | tobiu |
| createdAt | Oct 1, 2025, 7:46 PM |
| updatedAt | Oct 1, 2025, 7:47 PM |
| githubUrl | https://github.com/neomjs/neo/issues/7315 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Oct 1, 2025, 7:47 PM |
In
Neo.collection.Base#filter(), theallItemscollection was previously hardcoded to be created as aNeo.collection.Collectioninstance.This caused issues for subclasses like
Neo.data.Store, where theallItemscollection would lose the store's specific functionalities, such as lazy record instantiation via theget()method.The fix is to use
me.constructorinstead ofCollectionwhen creating theallItemsinstance. This ensures thatallItemsis an instance of the same class as the collection being filtered, preserving the subclass's methods and behaviors.This change is crucial for components like
Neo.form.field.ComboBoxthat rely on stores and their filtering capabilities.