Skip to content

Conversation

@toranb
Copy link

@toranb toranb commented Oct 29, 2015

A great deal of my relationships are rich one-to-many / m2m and require special care when a new item is selected. I've added a simple configuration item to prevent this if that's the desired behavior.

I've also updated the inline hbs compiler so we can write integration tests against this :)

@miguelcobain
Copy link
Owner

@toranb So, this is basically DDAU?

You're relying on the actions to update your selection, correct?

@toranb
Copy link
Author

toranb commented Oct 29, 2015

I suppose it is DDAU :)

I think this would be a great addition to your addon as it would enable both older (ember 1.x) style programming along side a more modern (ember 2.x) paradigm

@toranb
Copy link
Author

toranb commented Oct 29, 2015

If you think it's a good idea (the concept here) we could extend it to include the same "don't side effect" for add/remove. I realize now that this option should/might need to protect against all side effects/set "selection" code

thoughts?

@toranb
Copy link
Author

toranb commented Oct 29, 2015

I just updated the PR to include (now) select-item / add-item / remove-item

I found our multi-select instances of this are acting funny because addObject is invoked (by selectize), and only after this event will our custom add-item/ or remove-item handler be invoked.

This configuration option now prevents any side effect :)

@toranb
Copy link
Author

toranb commented Oct 29, 2015

Until this is pulled in I have a fork up on npm for anyone else who might want/or need this feature

https://www.npmjs.com/package/ember-cli-selectize-toranb

npm install [email protected]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants