LearnNewsExamplesServices
Frontmatter
id7315
titlecollection.Base#filter() should use constructor for allItems
stateClosed
labels
bug
assigneestobiu
createdAtOct 1, 2025, 7:46 PM
updatedAtOct 1, 2025, 7:47 PM
githubUrlhttps://github.com/neomjs/neo/issues/7315
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 1, 2025, 7:47 PM

collection.Base#filter() should use constructor for allItems

Closed v11.0.0 bug
tobiu
tobiu commented on Oct 1, 2025, 7:46 PM

In Neo.collection.Base#filter(), the allItems collection was previously hardcoded to be created as a Neo.collection.Collection instance.

This caused issues for subclasses like Neo.data.Store, where the allItems collection would lose the store's specific functionalities, such as lazy record instantiation via the get() method.

The fix is to use me.constructor instead of Collection when creating the allItems instance. This ensures that allItems is 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.ComboBox that rely on stores and their filtering capabilities.

tobiu assigned to @tobiu on Oct 1, 2025, 7:46 PM
tobiu added the bug label on Oct 1, 2025, 7:46 PM
tobiu referenced in commit ed6dc7b - "collection.Base#filter() should use constructor for allItems #7315" on Oct 1, 2025, 7:47 PM
tobiu closed this issue on Oct 1, 2025, 7:47 PM