You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
An undocumented feature of the collection helper is its ability to generate a selector given a function. This is actually a feature of all interactors, and collection is able to utilize it since it returns a function whose arguments can be curried to the selector function.
interactor.radios('red')//=> scoped interactor for the red radio button.
However, new top-level Interactor instances are globally scoped which means that when collection encounters a function and passes it along to the constructor, that collection item becomes globally scoped.
Collections are meant to remain scoped, so we need to make it so passing a selector function retains that scope. After this work I think we can finally document this feature.
The text was updated successfully, but these errors were encountered:
An undocumented feature of the
collection
helper is its ability to generate a selector given a function. This is actually a feature of all interactors, andcollection
is able to utilize it since it returns a function whose arguments can be curried to the selector function.However, new top-level
Interactor
instances are globally scoped which means that whencollection
encounters a function and passes it along to the constructor, that collection item becomes globally scoped.Collections are meant to remain scoped, so we need to make it so passing a selector function retains that scope. After this work I think we can finally document this feature.
The text was updated successfully, but these errors were encountered: