Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service for managing collection selections #26

Open
jtrussell opened this issue Oct 21, 2014 · 4 comments
Open

Add service for managing collection selections #26

jtrussell opened this issue Oct 21, 2014 · 4 comments

Comments

@jtrussell
Copy link
Owner

I.e. to manage selections without relying on the directive.

selectionModelMgr.select(myCollection, myItemInCollection, opts, true);

// or maybe

model = selectionModelFactory(myCollection, opts);
model.select(item1);
model.selectAll([item1, item2]);
model.selectRange(item1, item2);
@seanpoulter
Copy link

Before I head down a similar path, have you made any progress on this @jtrussell?

@jtrussell
Copy link
Owner Author

I haven't put down any code for this and I'd welcome a contribution. Did you have any thoughts on how the interface should be structured? I've got the selection manager on angular-ivh-treeview as prior art but I'm not super concerned with following the same pattern.

@seanpoulter
Copy link

My goal is to have a clean way to deselect items before I remove them from
the input list (used in the ng-repeat). I'd personally just follow the
angular-ivh-treeview approach to get'r done quick, and hopefully learn how
you're testing things.

2015-02-11 20:10 GMT-05:00 Justin Russell [email protected]:

I haven't put down any code for this and I'd welcome a contribution. Did
you have any thoughts on how the interface should be structured? I've got the
selection manager on angular-ivh-treeview
https://github.com/ivantage/angular-ivh-treeview#treeview-manager-service
as prior art but I'm not super concerned with following the same pattern.

Reply to this email directly or view it on GitHub
#26 (comment)
.

@jtrussell
Copy link
Owner Author

At the risk of over engineering everything I'm leaning towards tossing this service in a separate repo/module, I might eventually carve out the selectionModelOptions service into its own module as well so folks could pick and choose which pieces they need (or even replace pieces) and those settings are what will drive behavior of everything else. Thoughts?

I started a skeleton over here but I'm not 100% committed to this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants